nextUp

Calculate the next largest floating point value after x.

Return the least number greater than x that is representable as a real; thus, it gives the next point on the IEEE number line.

Special Values
xnextUp(x)
-∞-real.max
±0.0real.min_normal*real.epsilon
real.max
NaNNaN
@trusted pure nothrow @nogc
T
nextUp
(
T
)
(
const T x
)
if (
isFloatingPoint!T
)

Examples

assert(nextUp(1.0 - 1.0e-6).feqrel(0.999999) > 16);
assert(nextUp(1.0 - real.epsilon).feqrel(1.0) > 16);

Meta