Copyright | (c) 2011 MailRank Inc. |
---|---|
License | BSD-style |
Maintainer | bos@serpentine.com |
Stability | experimental |
Portability | GHC |
Safe Haskell | None |
Language | Haskell98 |
- toExponential :: Int -> Double -> Text
- toFixed :: Int -> Double -> Text
- toPrecision :: Int -> Double -> Text
- toShortest :: Double -> Text
Documentation
toExponential :: Int -> Double -> Text Source #
Compute a representation in exponential format with the requested number of digits after the decimal point. The last emitted digit is rounded. If -1 digits are requested, then the shortest exponential representation is computed.
toFixed :: Int -> Double -> Text Source #
Compute a decimal representation with a fixed number of digits after the decimal point. The last emitted digit is rounded.
toPrecision :: Int -> Double -> Text Source #
Compute precision
leading digits of the given value either in
exponential or decimal format. The last computed digit is rounded.
toShortest :: Double -> Text Source #
Compute the shortest string of digits that correctly represent the input number.