True if the representation of the argument is too small to be represented in normalized format.
Moduledimensional-1.5Haskell2010
Numeric.Units.Dimensional.Float
Defines convenience functions for inspecting and manipulating quantities with RealFloat floating-point representations.
The dimensionally-typed versions of functions from Patrick Perry's ieee754 package
copy that packages API as closely as possible, by permission. In turn they are based on
the tango math library for the D language.
- 22 values
- Packagedimensional-1.5
- Exports23
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceFloat.hs
Lifted Predicates from RealFloat
4 declarationsTrue if the representation of the argument is an IEEE infinity or negative infinity.
isInfinite (_1 / _0)True
isInfinite (42 *~ micro farad)False
True if the representation of the argument is an IEEE "not-a-number" (NaN) value.
isNaN _3False
isNaN (_1 / _0)False
isNaN (asin _4)True
True if the representation of the argument is an IEEE negative zero.
isNegativeZero _0False
isNegativeZero $ (-1e-200 *~ one) * (1e-200 *~ one)True
Convenience Functions
2 declarationsTrue if the representation of the argument is a number and is not infinite.
isFiniteNumber (_1 / _0)False
isFiniteNumber (_0 / _0)False
isFiniteNumber (_3 / _2)True
Multiplies a floating-point quantity by an integer power of the radix of the representation type.
Use floatRadix to determine the radix.
let x = 3 *~ meterscaleFloat 3 x24.0 m
Lifted Functions from Numeric.IEEE
0 declarationsValues
An infinite floating-point quantity.
The smallest representable positive quantity whose representation is normalized.
The largest representable finite floating-point quantity.
The smallest positive value x such that _1 + x is representable.
Default NaN quantity.
Arithmetic
Return the next smallest representable floating-point quantity (Infinity and NaN are unchanged).
Return the next largest representable floating-point quantity (Infinity and NaN are unchanged).
Given two floating-point quantities with the same sign, return the quantity whose representation is halfway
between their representations on the IEEE number line. If the signs of the values differ or either is NaN,
the value is undefined.
copySign x y returns the quantity x with its sign changed to match that of y.
NaN with Payload
Quiet NaN quantity with a positive integer payload.
Payload must be less than maxNaNPayload of the representation type.
Beware that while some platforms allow using 0 as a payload, this behavior is not portable.
The payload stored in a NaN quantity. Undefined if the argument is not NaN.
Maximum NaN payload for type a.
Comparisons
Return True if two floating-point quantities are exactly (bitwise) equal.
Return the minimum of two quantities; if one value is NaN, return the other. Prefer the first if both values are NaN.
Return the maximum of two quantities; if one value is NaN, return the other. Prefer the first if both values are NaN.
Return the minimum of two quantities; if one value is NaN, return it. Prefer the first if both values are NaN.
Return the maximum of two quantities; if one value is NaN, return it. Prefer the first if both values are NaN.