nextAfter

Returns the next value after or before x, toward y.

  1. D1 nextAfter(D1 x, D2 y)
    D1
    nextAfter
    (
    D1
    D2
    )
    (
    auto const ref D1 x
    ,
    auto const ref D2 y
    )
    if (
    isDecimal!(D1, D2)
    )
  2. alias nextToward = nextAfter

Throws

InvalidOperationExceptioneither x or y is signaling NaN
OverflowExceptionresult is ±∞
UnderflowExceptionresult is subnormal or ±0.0
InexactExceptionresult is ±∞, subnormal or ±0.0

Special values

xynextAfter(x, y)
NaNanyNaN
anyNaNNaN
x = yx
x < ynextUp(x)
x > ynextDown(x)

Meta