altfloat-0.3.1: Alternative floating point support for GHC.



Top level module for alternative floating point support.



data Double Source

The Double type. This is expected to be an identical declaration to the one found in GHC.Prim. We avoid simply using GHC's type because we need to define our own class instances.

fquotRem :: RealFloat a => a -> a -> (a, a)Source

fquotRem x y computes the remainder and integral quotient upon division of x by y. The result is (x-n*y, n), where n is the value x/y rounded to the nearest integer.

toFloating :: FloatConvert a b => a -> bSource

Convert to a floating point type. Conversions from integers and real types are provided, as well as conversions between floating point types. Conversions between floating point types preserve infinities, negative zeros and NaNs.