-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | IEEE 754-2019 compliant operations
--   
--   Please see the README on GitHub at
--   <a>https://github.com/minoki/haskell-floating-point/tree/master/fp-ieee#readme</a>
@package fp-ieee
@version 0.1.0.6


-- | This module provides IEEE 754-compliant operations for floating-point
--   numbers.
--   
--   The functions in this module assume that the given floating-point type
--   conform to IEEE 754 format.
--   
--   Since <a>RealFloat</a> constraint is insufficient to query properties
--   of a NaN, the functions here assumes all NaN as positive, quiet. If
--   you want better treatment for NaNs, use the module
--   <a>Numeric.Floating.IEEE.NaN</a>.
--   
--   Since floating-point exceptions cannot be accessed from Haskell, the
--   operations provided by this module ignore exceptional behavior. This
--   library assumes the default exception handling is in use.
--   
--   If you are using GHC &lt;= 8.8 on i386 target, you may need to set
--   <tt>-msse2</tt> option to get correct floating-point behavior.
module Numeric.Floating.IEEE

-- | <tt><a>round'</a> x</tt> returns the nearest integral value to
--   <tt>x</tt>; the even integer if <tt>x</tt> is equidistant between two
--   integers.
--   
--   IEEE 754 <tt>roundToIntegralTiesToEven</tt> operation.
--   
--   <pre>
--   \(x :: Double) -&gt; isFinite x ==&gt; (round' x == fromInteger (round x))
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; round' (-0.5)
--   -0.0
--   </pre>
round' :: RealFloat a => a -> a

-- | <tt><a>roundAway'</a> x</tt> returns the nearest integral value to
--   <tt>x</tt>; the one with larger magnitude is returned if <tt>x</tt> is
--   equidistant between two integers.
--   
--   IEEE 754 <tt>roundToIntegralTiesToAway</tt> operation.
--   
--   <pre>
--   \(x :: Double) -&gt; isFinite x ==&gt; roundAway' x == fromInteger (roundAway x)
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; roundAway' (-0.5)
--   -1.0
--   
--   &gt;&gt;&gt; roundAway' (-0.4)
--   -0.0
--   </pre>
roundAway' :: RealFloat a => a -> a

-- | <tt><a>truncate'</a> x</tt> returns the integral value nearest to
--   <tt>x</tt>, and whose magnitude is not greater than that of
--   <tt>x</tt>.
--   
--   IEEE 754 <tt>roundToIntegralTowardZero</tt> operation.
--   
--   <pre>
--   \(x :: Double) -&gt; isFinite x ==&gt; truncate' x == fromInteger (truncate x)
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; truncate' (-0.5)
--   -0.0
--   </pre>
truncate' :: RealFloat a => a -> a

-- | <tt><a>ceiling'</a> x</tt> returns the least integral value that is
--   not less than <tt>x</tt>.
--   
--   IEEE 754 <tt>roundToIntegralTowardPositive</tt> operation.
--   
--   <pre>
--   \(x :: Double) -&gt; isFinite x ==&gt; ceiling' x == fromInteger (ceiling x)
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; ceiling' (-0.8)
--   -0.0
--   
--   &gt;&gt;&gt; ceiling' (-0.5)
--   -0.0
--   </pre>
ceiling' :: RealFloat a => a -> a

-- | <tt><a>floor'</a> x</tt> returns the greatest integral value that is
--   not greater than <tt>x</tt>.
--   
--   IEEE 754 <tt>roundToIntegralTowardNegative</tt> operation.
--   
--   <pre>
--   \(x :: Double) -&gt; isFinite x ==&gt; floor' x == fromInteger (floor x)
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; floor' (-0.1)
--   -1.0
--   
--   &gt;&gt;&gt; floor' (-0)
--   -0.0
--   </pre>
floor' :: RealFloat a => a -> a

-- | Returns the smallest value that is larger than the argument.
--   
--   IEEE 754 <tt>nextUp</tt> operation.
--   
--   <pre>
--   &gt;&gt;&gt; nextUp 1 == (0x1.000002p0 :: Float)
--   True
--   
--   &gt;&gt;&gt; nextUp 1 == (0x1.0000_0000_0000_1p0 :: Double)
--   True
--   
--   &gt;&gt;&gt; nextUp (1/0) == (1/0 :: Double)
--   True
--   
--   &gt;&gt;&gt; nextUp (-1/0) == (- maxFinite :: Double)
--   True
--   
--   &gt;&gt;&gt; nextUp 0 == (0x1p-1074 :: Double)
--   True
--   
--   &gt;&gt;&gt; nextUp (-0) == (0x1p-1074 :: Double)
--   True
--   
--   &gt;&gt;&gt; nextUp (-0x1p-1074) :: Double -- returns negative zero
--   -0.0
--   </pre>
nextUp :: RealFloat a => a -> a

-- | Returns the largest value that is smaller than the argument.
--   
--   IEEE 754 <tt>nextDown</tt> operation.
--   
--   <pre>
--   &gt;&gt;&gt; nextDown 1 == (0x1.ffff_ffff_ffff_fp-1 :: Double)
--   True
--   
--   &gt;&gt;&gt; nextDown 1 == (0x1.fffffep-1 :: Float)
--   True
--   
--   &gt;&gt;&gt; nextDown (1/0) == (maxFinite :: Double)
--   True
--   
--   &gt;&gt;&gt; nextDown (-1/0) == (-1/0 :: Double)
--   True
--   
--   &gt;&gt;&gt; nextDown 0 == (-0x1p-1074 :: Double)
--   True
--   
--   &gt;&gt;&gt; nextDown (-0) == (-0x1p-1074 :: Double)
--   True
--   
--   &gt;&gt;&gt; nextDown 0x1p-1074 -- returns positive zero
--   0.0
--   
--   &gt;&gt;&gt; nextDown 0x1p-1022 == (0x0.ffff_ffff_ffff_fp-1022 :: Double)
--   True
--   </pre>
nextDown :: RealFloat a => a -> a

-- | Returns the value whose magnitude is smaller than that of the
--   argument, and is closest to the argument.
--   
--   This operation is not in IEEE, but may be useful to some.
--   
--   <pre>
--   &gt;&gt;&gt; nextTowardZero 1 == (0x1.ffff_ffff_ffff_fp-1 :: Double)
--   True
--   
--   &gt;&gt;&gt; nextTowardZero 1 == (0x1.fffffep-1 :: Float)
--   True
--   
--   &gt;&gt;&gt; nextTowardZero (1/0) == (maxFinite :: Double)
--   True
--   
--   &gt;&gt;&gt; nextTowardZero (-1/0) == (-maxFinite :: Double)
--   True
--   
--   &gt;&gt;&gt; nextTowardZero 0 :: Double -- returns positive zero
--   0.0
--   
--   &gt;&gt;&gt; nextTowardZero (-0 :: Double) -- returns negative zero
--   -0.0
--   
--   &gt;&gt;&gt; nextTowardZero 0x1p-1074 :: Double
--   0.0
--   </pre>
nextTowardZero :: RealFloat a => a -> a

-- | <tt><a>remainder</a> x y</tt> returns &lt;math&gt;, where &lt;math&gt;
--   is the integer nearest the exact number &lt;math&gt;; i.e.
--   &lt;math&gt;.
--   
--   IEEE 754 <tt>remainder</tt> operation.
remainder :: RealFloat a => a -> a -> a

-- | IEEE 754 <tt>scaleB</tt> operation, with each rounding attributes.
scaleFloatTiesToEven :: RealFloat a => Int -> a -> a

-- | IEEE 754 <tt>scaleB</tt> operation, with each rounding attributes.
scaleFloatTiesToAway :: RealFloat a => Int -> a -> a

-- | IEEE 754 <tt>scaleB</tt> operation, with each rounding attributes.
scaleFloatTowardPositive :: RealFloat a => Int -> a -> a

-- | IEEE 754 <tt>scaleB</tt> operation, with each rounding attributes.
scaleFloatTowardNegative :: RealFloat a => Int -> a -> a

-- | IEEE 754 <tt>scaleB</tt> operation, with each rounding attributes.
scaleFloatTowardZero :: RealFloat a => Int -> a -> a

-- | <a>exponent</a> corresponds to the second component of
--   <a>decodeFloat</a>. <tt><a>exponent</a> 0 = 0</tt> and for finite
--   nonzero <tt>x</tt>, <tt><a>exponent</a> x = snd (<a>decodeFloat</a> x)
--   + <a>floatDigits</a> x</tt>. If <tt>x</tt> is a finite floating-point
--   number, it is equal in value to <tt><a>significand</a> x * b ^^
--   <a>exponent</a> x</tt>, where <tt>b</tt> is the floating-point radix.
--   The behaviour is unspecified on infinite or <tt>NaN</tt> values.
exponent :: RealFloat a => a -> Int
(+) :: Num a => a -> a -> a
infixl 6 +
(-) :: Num a => a -> a -> a
infixl 6 -
(*) :: Num a => a -> a -> a
infixl 7 *

-- | Fractional division.
(/) :: Fractional a => a -> a -> a
infixl 7 /
sqrt :: Floating a => a -> a

-- | <tt><a>fusedMultiplyAdd</a> a b c</tt> computes <tt>a * b + c</tt> as
--   a single, ternary operation. Rounding is done only once.
--   
--   May make use of hardware FMA instructions if the target architecture
--   has it; set <tt>fma3</tt> package flag on x86 systems.
--   
--   IEEE 754 <tt>fusedMultiplyAdd</tt> operation.
--   
--   <pre>
--   \(a :: Double) (b :: Double) (c :: Double) -&gt; fusedMultiplyAdd a b c == fromRational (toRational a * toRational b + toRational c)
--   </pre>
fusedMultiplyAdd :: RealFloat a => a -> a -> a -> a

-- | IEEE 754 <tt>addition</tt> operation.
genericAdd :: (RealFloat a, RealFloat b) => a -> a -> b
infixl 6 `genericAdd`

-- | IEEE 754 <tt>subtraction</tt> operation.
genericSub :: (RealFloat a, RealFloat b) => a -> a -> b
infixl 6 `genericSub`

-- | IEEE 754 <tt>multiplication</tt> operation.
genericMul :: (RealFloat a, RealFloat b) => a -> a -> b
infixl 7 `genericMul`

-- | IEEE 754 <tt>division</tt> operation.
genericDiv :: (RealFloat a, RealFloat b) => a -> a -> b
infixl 7 `genericDiv`

-- | IEEE 754 <tt>fusedMultiplyAdd</tt> operation.
genericFusedMultiplyAdd :: (RealFloat a, RealFloat b) => a -> a -> a -> b

-- | IEEE 754 <tt>convertFromInt</tt> operation, with each rounding
--   attributes.
fromIntegerTiesToEven :: RealFloat a => Integer -> a

-- | IEEE 754 <tt>convertFromInt</tt> operation, with each rounding
--   attributes.
fromIntegerTiesToAway :: RealFloat a => Integer -> a

-- | IEEE 754 <tt>convertFromInt</tt> operation, with each rounding
--   attributes.
fromIntegerTowardPositive :: RealFloat a => Integer -> a

-- | IEEE 754 <tt>convertFromInt</tt> operation, with each rounding
--   attributes.
fromIntegerTowardNegative :: RealFloat a => Integer -> a

-- | IEEE 754 <tt>convertFromInt</tt> operation, with each rounding
--   attributes.
fromIntegerTowardZero :: RealFloat a => Integer -> a

-- | IEEE 754 <tt>convertFromInt</tt> operation, with each rounding
--   attributes.
fromIntegralTiesToEven :: (Integral i, RealFloat a) => i -> a

-- | IEEE 754 <tt>convertFromInt</tt> operation, with each rounding
--   attributes.
fromIntegralTiesToAway :: (Integral i, RealFloat a) => i -> a

-- | IEEE 754 <tt>convertFromInt</tt> operation, with each rounding
--   attributes.
fromIntegralTowardPositive :: (Integral i, RealFloat a) => i -> a

-- | IEEE 754 <tt>convertFromInt</tt> operation, with each rounding
--   attributes.
fromIntegralTowardNegative :: (Integral i, RealFloat a) => i -> a

-- | IEEE 754 <tt>convertFromInt</tt> operation, with each rounding
--   attributes.
fromIntegralTowardZero :: (Integral i, RealFloat a) => i -> a

-- | Conversion from a rational number to floating-point value, with each
--   rounding attributes.
fromRationalTiesToEven :: RealFloat a => Rational -> a

-- | Conversion from a rational number to floating-point value, with each
--   rounding attributes.
fromRationalTiesToAway :: RealFloat a => Rational -> a

-- | Conversion from a rational number to floating-point value, with each
--   rounding attributes.
fromRationalTowardPositive :: RealFloat a => Rational -> a

-- | Conversion from a rational number to floating-point value, with each
--   rounding attributes.
fromRationalTowardNegative :: RealFloat a => Rational -> a

-- | Conversion from a rational number to floating-point value, with each
--   rounding attributes.
fromRationalTowardZero :: RealFloat a => Rational -> a

-- | <tt><a>round</a> x</tt> returns the nearest integer to <tt>x</tt>; the
--   even integer if <tt>x</tt> is equidistant between two integers
round :: (RealFrac a, Integral b) => a -> b

-- | <tt><a>roundAway</a> x</tt> returns the nearest integer to <tt>x</tt>;
--   the integer with larger magnitude is returned if <tt>x</tt> is
--   equidistant between two integers.
--   
--   IEEE 754 <tt>convertToIntegerTiesToAway</tt> operation.
--   
--   <pre>
--   &gt;&gt;&gt; roundAway 4.5
--   5
--   </pre>
roundAway :: (RealFrac a, Integral b) => a -> b

-- | <tt><a>truncate</a> x</tt> returns the integer nearest <tt>x</tt>
--   between zero and <tt>x</tt>
truncate :: (RealFrac a, Integral b) => a -> b

-- | <tt><a>ceiling</a> x</tt> returns the least integer not less than
--   <tt>x</tt>
ceiling :: (RealFrac a, Integral b) => a -> b

-- | <tt><a>floor</a> x</tt> returns the greatest integer not greater than
--   <tt>x</tt>
floor :: (RealFrac a, Integral b) => a -> b

-- | Converts a floating-point value into another type.
--   
--   Similar to <a>realToFrac</a>, but treats NaN, infinities, negative
--   zero even if the rewrite rule is off.
--   
--   IEEE 754 <tt>convertFormat</tt> operation.
realFloatToFrac :: (RealFloat a, Fractional b) => a -> b

-- | A specialized version of <a>realFloatToFrac</a>.
--   
--   The resulting value will be canonical and non-signaling.
canonicalize :: RealFloat a => a -> a

-- | Unary negation.
negate :: Num a => a -> a

-- | Absolute value.
abs :: Num a => a -> a

-- | The classification of floating-point values.
data Class
SignalingNaN :: Class
QuietNaN :: Class
NegativeInfinity :: Class
NegativeNormal :: Class
NegativeSubnormal :: Class
NegativeZero :: Class
PositiveZero :: Class
PositiveSubnormal :: Class
PositiveNormal :: Class
PositiveInfinity :: Class

-- | Classifies a floating-point value.
--   
--   Since <a>RealFloat</a> constraint is insufficient to query signaling
--   status of a NaN, this function treats all NaNs as quiet. See also
--   <a>Numeric.Floating.IEEE.NaN</a>.
classify :: RealFloat a => a -> Class

-- | Returns <tt>True</tt> if the argument is negative (including negative
--   zero).
--   
--   Since <a>RealFloat</a> constraint is insufficient to query the sign of
--   NaNs, this function treats all NaNs as positive. See also
--   <a>Numeric.Floating.IEEE.NaN</a>.
--   
--   IEEE 754 <tt>isSignMinus</tt> operation.
isSignMinus :: RealFloat a => a -> Bool

-- | IEEE 754 <tt>isNormal</tt> operation.
isNormal :: RealFloat a => a -> Bool

-- | Returns <tt>True</tt> if the argument is normal, subnormal, or zero.
--   
--   IEEE 754 <tt>isFinite</tt> operation.
isFinite :: RealFloat a => a -> Bool

-- | Returns <tt>True</tt> if the argument is zero.
--   
--   IEEE 754 <tt>isZero</tt> operation.
isZero :: RealFloat a => a -> Bool

-- | <a>True</a> if the argument is too small to be represented in
--   normalized format
isDenormalized :: RealFloat a => a -> Bool

-- | <a>True</a> if the argument is an IEEE infinity or negative infinity
isInfinite :: RealFloat a => a -> Bool

-- | <a>True</a> if the argument is an IEEE "not-a-number" (NaN) value
isNaN :: RealFloat a => a -> Bool

-- | a constant function, returning the radix of the representation (often
--   <tt>2</tt>)
floatRadix :: RealFloat a => a -> Integer

-- | Comparison with IEEE 754 <tt>totalOrder</tt> predicate.
--   
--   Floating-point numbers are ordered as, &lt;math&gt;.
--   
--   Since <a>RealFloat</a> constraint is insufficient to query the sign
--   and payload of NaNs, this function treats all NaNs as positive and
--   does not make distinction between them. See also
--   <a>Numeric.Floating.IEEE.NaN</a>.
--   
--   Also, for the same reason, this function cannot distinguish the
--   members of a cohort.
compareByTotalOrder :: RealFloat a => a -> a -> Ordering

-- | Comparison with IEEE 754 <tt>totalOrderMag</tt> predicate.
--   
--   Equivalent to <tt><a>compareByTotalOrder</a> (abs x) (abs y)</tt>.
compareByTotalOrderMag :: RealFloat a => a -> a -> Ordering

-- | IEEE 754 <tt>augmentedAddition</tt> operation.
--   
--   The first return value is the approximation of the sum, and the second
--   return value is the error.
--   
--   <pre>
--   fst (augmentedAddition x y) == roundTiesTowardZero (fromRationalR (toRational x + toRational y)) `const` (x :: Double)
--   </pre>
--   
--   <pre>
--   let (u, v) = augmentedAddition x y in toRational u + toRational v == toRational x + toRational y `const` (x :: Double)
--   </pre>
augmentedAddition :: RealFloat a => a -> a -> (a, a)

-- | IEEE 754 <tt>augmentedSubtraction</tt> operation.
--   
--   The first return value is the approximation of the difference, and the
--   second return value is the error.
--   
--   <pre>
--   fst (augmentedSubtraction x y) == roundTiesTowardZero (fromRationalR (toRational x - toRational y)) `const` (x :: Double)
--   </pre>
--   
--   <pre>
--   let (u, v) = augmentedSubtraction x y in toRational u + toRational v == toRational x - toRational y `const` (x :: Double)
--   </pre>
augmentedSubtraction :: RealFloat a => a -> a -> (a, a)

-- | IEEE 754 <tt>augmentedMultiplication</tt> operation.
--   
--   The first return value is the approximation of the product, and the
--   second return value is the error.
--   
--   <pre>
--   fst (augmentedMultiplication x y) == roundTiesTowardZero (fromRationalR (toRational x * toRational y)) `const` (x :: Double)
--   </pre>
--   
--   <pre>
--   let (u, v) = augmentedMultiplication x y in toRational u + toRational v == toRational x * toRational y `const` (x :: Double)
--   </pre>
augmentedMultiplication :: RealFloat a => a -> a -> (a, a)

-- | IEEE 754 <tt>minimum</tt> operation. <tt>-0</tt> is smaller than
--   <tt>+0</tt>. Propagates NaNs.
minimum' :: RealFloat a => a -> a -> a

-- | IEEE 754 <tt>minimumNumber</tt> operation. <tt>-0</tt> is smaller than
--   <tt>+0</tt>. Treats NaNs as missing data.
minimumNumber :: RealFloat a => a -> a -> a

-- | IEEE 754 <tt>maximum</tt> operation. <tt>-0</tt> is smaller than
--   <tt>+0</tt>. Propagates NaNs.
maximum' :: RealFloat a => a -> a -> a

-- | IEEE 754 <tt>maximumNumber</tt> operation. <tt>-0</tt> is smaller than
--   <tt>+0</tt>. Treats NaNs as missing data.
maximumNumber :: RealFloat a => a -> a -> a

-- | IEEE 754 <tt>minimumMagnitude</tt> operation.
minimumMagnitude :: RealFloat a => a -> a -> a

-- | IEEE 754 <tt>minimumMagnitudeNumber</tt> operation.
minimumMagnitudeNumber :: RealFloat a => a -> a -> a

-- | IEEE 754 <tt>maximumMagnitude</tt> operation.
maximumMagnitude :: RealFloat a => a -> a -> a

-- | IEEE 754 <tt>maximumMagnitudeNumber</tt> operation.
maximumMagnitudeNumber :: RealFloat a => a -> a -> a

-- | The smallest positive value expressible in an IEEE floating-point
--   format. This value is subnormal.
--   
--   <pre>
--   &gt;&gt;&gt; (minPositive :: Float) == 0x1p-149
--   True
--   
--   &gt;&gt;&gt; (minPositive :: Double) == 0x1p-1074
--   True
--   
--   &gt;&gt;&gt; nextDown (minPositive :: Float)
--   0.0
--   
--   &gt;&gt;&gt; nextDown (minPositive :: Double)
--   0.0
--   </pre>
minPositive :: RealFloat a => a

-- | The smallest positive normal value expressible in an IEEE
--   floating-point format.
--   
--   <pre>
--   &gt;&gt;&gt; (minPositiveNormal :: Float) == 0x1p-126
--   True
--   
--   &gt;&gt;&gt; (minPositiveNormal :: Double) == 0x1p-1022
--   True
--   
--   &gt;&gt;&gt; isDenormalized (minPositiveNormal :: Float)
--   False
--   
--   &gt;&gt;&gt; isDenormalized (minPositiveNormal :: Double)
--   False
--   
--   &gt;&gt;&gt; isDenormalized (nextDown (minPositiveNormal :: Float))
--   True
--   
--   &gt;&gt;&gt; isDenormalized (nextDown (minPositiveNormal :: Double))
--   True
--   </pre>
minPositiveNormal :: RealFloat a => a

-- | The largest finite value expressible in an IEEE floating-point format.
--   
--   <pre>
--   &gt;&gt;&gt; (maxFinite :: Float) == 0x1.fffffep+127
--   True
--   
--   &gt;&gt;&gt; (maxFinite :: Double) == 0x1.ffff_ffff_ffff_fp+1023
--   True
--   </pre>
maxFinite :: RealFloat a => a


-- | This module provides the typeclass for NaN manipulation:
--   <a>RealFloatNaN</a>.
--   
--   In addition to <a>Float</a> and <a>Double</a>, a couple of
--   floating-point types provided by third-party libraries can be
--   supported via package flags: <tt>Half</tt> via <tt>half</tt> and
--   <tt>Float128</tt> via <tt>float128</tt>.
module Numeric.Floating.IEEE.NaN

-- | An instance of this class supports manipulation of NaN.
class RealFloat a => RealFloatNaN a

-- | Returns the first operand, with the sign of the second.
--   
--   IEEE 754 <tt>copySign</tt> operation.
copySign :: RealFloatNaN a => a -> a -> a

-- | Returns <tt>True</tt> if the operand is a negative number, negative
--   infinity, negative zero, or a NaN with negative sign bit.
--   
--   IEEE 754 <tt>isSignMinus</tt> operation.
isSignMinus :: RealFloatNaN a => a -> Bool

-- | Returns <tt>True</tt> if the operand is a signaling NaN.
--   
--   IEEE 754 <tt>isSignaling</tt> operation.
--   
--   Warning: GHC's optimizer is not aware of signaling NaNs.
isSignaling :: RealFloatNaN a => a -> Bool

-- | Returns the payload of a NaN. Returns <tt>-1</tt> if the operand is
--   not a NaN.
--   
--   IEEE 754 <tt>getPayload</tt> operation.
getPayload :: RealFloatNaN a => a -> a

-- | Returns a quiet NaN with a given payload. Returns a positive zero if
--   the payload is invalid.
--   
--   IEEE 754 <tt>setPayload</tt> operation.
setPayload :: RealFloatNaN a => a -> a

-- | Returns a signaling NaN with a given payload. Returns a positive zero
--   if the payload is invalid.
--   
--   IEEE 754 <tt>setPayloadSignaling</tt> operation.
setPayloadSignaling :: RealFloatNaN a => a -> a

-- | IEEE 754 <tt>class</tt> operation.
classify :: RealFloatNaN a => a -> Class

-- | Equality with IEEE 754 <tt>totalOrder</tt> operation.
equalByTotalOrder :: RealFloatNaN a => a -> a -> Bool

-- | Comparison with IEEE 754 <tt>totalOrder</tt> operation.
--   
--   Floating-point numbers should be ordered as, &lt;math&gt;.
compareByTotalOrder :: RealFloatNaN a => a -> a -> Ordering

-- | The classification of floating-point values.
data Class
SignalingNaN :: Class
QuietNaN :: Class
NegativeInfinity :: Class
NegativeNormal :: Class
NegativeSubnormal :: Class
NegativeZero :: Class
PositiveZero :: Class
PositiveSubnormal :: Class
PositiveNormal :: Class
PositiveInfinity :: Class

-- | A newtype wrapper to compare floating-point numbers by
--   <tt>totalOrder</tt> predicate.
newtype TotallyOrdered a
TotallyOrdered :: a -> TotallyOrdered a
