0 | ||| Various IEEE floating-point number constants
 1 | module Data.Double
 2 |
 3 | ||| Largest number that can be added to a floating-point number without changing
 4 | ||| its value, i.e. `1.0 + unitRoundoff == 1.0`.
 5 | %foreign "scheme:blodwen-calcFlonumUnitRoundoff"
 6 |          "node:lambda:()=>Number.EPSILON / 2"
 7 | export
 8 | unitRoundoff : Double
 9 |
10 | ||| Machine epsilon is the smallest floating-point number that distinguishes two
11 | ||| floating-point numbers; the step size on the floating-point number line.
12 | -- /!\ See `support/racket/support.rkt:42-45`
13 | -- %foreign "scheme,chez:blodwen-calcFlonumEpsilon"
14 | --          "scheme,racket:blodwen-flonumEpsilon"
15 | %foreign "scheme:blodwen-calcFlonumEpsilon"
16 |          "node:lambda:()=>Number.EPSILON"
17 | export
18 | epsilon : Double
19 |
20 |
21 | ||| Not a number, e.g. `0.0 / 0.0`. Never equal to anything, including itself.
22 | %foreign "scheme:blodwen-flonumNaN"
23 |          "node:lambda:()=>Number.NaN"
24 | export
25 | nan : Double
26 |
27 |
28 | ||| Positive Infinity. Can be negated to obtain Negative Infinity.
29 | %foreign "scheme:blodwen-flonumInf"
30 |          "node:lambda:()=>Infinity"
31 | export
32 | inf : Double
33 |
34 |