ivory-0.1.0.7: Safe embedded C programming.

Safe HaskellNone
LanguageHaskell2010

Ivory.Language.Float

Synopsis

Documentation

isnan :: forall a. (IvoryVar a, Floating a) => a -> IBool Source #

NaN testing.

isinf :: forall a. (IvoryVar a, Floating a) => a -> IBool Source #

Infinite testing.

newtype IFloat Source #

Constructors

IFloat 

Fields

Instances

Floating IFloat Source # 
Fractional IFloat Source # 
Num IFloat Source # 
IvoryExpr IFloat Source # 

Methods

wrapExpr :: Expr -> IFloat Source #

IvoryVar IFloat Source # 
IvoryType IFloat Source # 
IvoryOrd IFloat Source # 
IvoryEq IFloat Source # 
IvoryStore IFloat Source # 
IvoryFloat IFloat Source # 
Default IFloat Source # 

Methods

defaultVal :: IFloat

IvoryZeroVal IFloat Source # 
IvoryInit IFloat Source # 
(Default to, Bounded to, IvoryIntegral to, SafeCast to IFloat) => RuntimeCast IFloat to Source #

Casting from a floating to a Integral type always results in truncation.

Methods

inBounds :: to -> IFloat -> IBool

SafeCast Sint32 IFloat Source # 
SafeCast Sint16 IFloat Source # 
SafeCast Sint8 IFloat Source # 
SafeCast Uint32 IFloat Source # 
SafeCast Uint16 IFloat Source # 
SafeCast Uint8 IFloat Source # 
SafeCast IBool IFloat Source # 
SafeCast IFloat IDouble Source # 
SafeCast IFloat IFloat Source # 

newtype IDouble Source #

Constructors

IDouble 

Fields

Instances

Floating IDouble Source # 
Fractional IDouble Source # 
Num IDouble Source # 
IvoryExpr IDouble Source # 
IvoryVar IDouble Source # 
IvoryType IDouble Source # 
IvoryOrd IDouble Source # 
IvoryEq IDouble Source # 
IvoryStore IDouble Source # 
IvoryFloat IDouble Source # 
Default IDouble Source # 
IvoryZeroVal IDouble Source # 
IvoryInit IDouble Source # 
(Default to, Bounded to, IvoryIntegral to, SafeCast to IDouble) => RuntimeCast IDouble to Source # 

Methods

inBounds :: to -> IDouble -> IBool

SafeCast Sint64 IDouble Source # 
SafeCast Sint32 IDouble Source # 
SafeCast Sint16 IDouble Source # 
SafeCast Sint8 IDouble Source # 
SafeCast Uint64 IDouble Source # 
SafeCast Uint32 IDouble Source # 
SafeCast Uint16 IDouble Source # 
SafeCast Uint8 IDouble Source # 
SafeCast IBool IDouble Source # 
SafeCast IDouble IDouble Source # 
SafeCast IFloat IDouble Source # 

primRound :: IvoryExpr a => ExpOp -> a -> a Source #

class (Floating a, IvoryExpr a) => IvoryFloat a where Source #

Methods

roundF :: a -> a Source #

Round a floating point number.

ceilF :: a -> a Source #

Take the ceiling of a floating point number.

floorF :: a -> a Source #

Take the floor of a floating point number.

atan2F :: a -> a -> a Source #

The arctangent function of two arguments.