The OpenD Programming Language

nextDown

Calculate the next smallest floating point value before x.

Return the greatest number less than x that is representable as a real; thus, it gives the previous point on the IEEE number line.

Special Values
xnextDown(x)
real.max
±0.0-real.min_normal*real.epsilon
-real.max-∞
-∞-∞
NaNNaN
  1. real nextDown(real x)
  2. double nextDown(double x)
  3. float nextDown(float x)
    @safe pure nothrow @nogc
    float
    nextDown
    (
    float x
    )

Examples

assert( nextDown(1.0 + real.epsilon) == 1.0);

Meta