repa-array-4.0.0.2: Bulk array representations and operators.

Safe HaskellNone
LanguageHaskell98

Data.Repa.IO.Convert

Contents

Synopsis

Conversion

Read and Show Doubles 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 of Word8 then use readDoubleFromBytes instead to avoid the conversion.

readDoubleFromBytes :: Array F Word8 -> Double Source

Convert a foreign vector of bytes to a Double.

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.