Safe Haskell | None |
---|---|
Language | Haskell98 |
Conversion
Read and Show Double
s for a reasonable runtime cost.
readDouble :: Array F Char -> Double Source
Convert a foreign vector of characters to a Double.
- The standard Haskell
Char
type is four bytes in length. If you already have a vector ofWord8
then usereadDoubleFromBytes
instead to avoid the conversion.
showDouble :: Double -> Array F Char Source
Convert a Double
to ASCII text packed into a foreign Vector
.
showDoubleAsBytes :: Double -> Array F Word8 Source
Convert a Double
to ASCII text packed into a foreign Vector
.
showDoubleFixed :: Int -> Double -> Array F Char Source
Like showDouble
, but use a fixed number of digits after
the decimal point.
showDoubleFixedAsBytes :: Int -> Double -> Array F Word8 Source
Like showDoubleAsBytes
, but use a fixed number of digits after
the decimal point.