Return Just x if it's a finite number, otherwise return Nothing.
ModuleAgda-2.7.0.1Haskell2010
Agda.Utils.Float
Logically consistent comparison of floating point numbers.
- 43 values
- PackageAgda-2.7.0.1
- Exports43
- LanguageHaskell2010
- LicenceMIT
- SourceFloat.hs
Checks whether or not the Double is within a safe range of operation.
Denotational equality for floating point numbers, checks bitwise equality.
NOTE: Denotational equality distinguishes NaNs, so its results may vary depending on the architecture and compilation flags. Unfortunately, this is a problem with floating-point numbers in general.
I guess "denotational orderings" are now a thing? The point is that we need an Ord instance which provides a total ordering, and is consistent with the denotational equality.
NOTE: The ordering induced via doubleToWord64 is total, and is consistent with doubleDenotEq. However, it is *deeply* unintuitive. For one, it considers all negative numbers to be larger than positive numbers.
Decode a Double to an integer ratio.
Encode an integer ratio as a double.
Decode a Double to its mantissa and its exponent, normalised such that the mantissa is the smallest possible number without loss of accuracy.
Encode a mantissa and an exponent as a Double.
Remove suffix .0 from printed floating point number.