Top level module for alternative floating point support.

- module Data.Floating.Classes
- data Double
- data Float
- isInfinite :: PrimFloat a => a -> Bool
- isNaN :: PrimFloat a => a -> Bool
- isNormal :: PrimFloat a => a -> Bool
- isSubNormal :: PrimFloat a => a -> Bool
- isFinite :: PrimFloat a => a -> Bool
- isNegativeZero :: PrimFloat a => a -> Bool
- fquotRem :: RealFloat a => a -> a -> (a, a)
- toFloating :: FloatConvert a b => a -> b

# Documentation

module Data.Floating.Classes

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.

The Float type.

isInfinite :: PrimFloat a => a -> BoolSource

isSubNormal :: PrimFloat a => a -> BoolSource

isNegativeZero :: PrimFloat a => a -> BoolSource

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.