c/numeric/math/nextafter

@1-3@ First, converts both arguments to the type of the function, then returns the next representable value of in the direction of. If equals to,  is returned. @4-6@ First, converts the first argument to the type of the function, then returns the next representable value of in the direction of. If equals to,  is returned, converted from  to the return type of the function without loss of range or precision. @7@ Type-generic macro: If any argument has type, is called. Otherwise, if any argument has integer type or has type, is called. Otherwise, is called. @8@ Type-generic macro: If the argument has type,  is called. Otherwise, if has integer type or the type,  is called. Otherwise, is called.

Return value
If no errors occur, the next representable value of in the direction of. is returned. If equals, then  is returned, converted to the type of the function.

If a range error due to overflow occurs, huge_val,, or is returned (with the same sign as ).

If a range error occurs due to underflow, the correct result is returned.

Error handling
Errors are reported as specified in.

If the implementation supports IEEE floating-point arithmetic (IEC 60559),
 * if is finite, but the expected result is an infinity, raises fe_inexact and fe_overflow
 * if does not equal  and the result is subnormal or zero, raises fe_inexact and fe_underflow
 * in any case, the returned value is independent of the current rounding mode
 * if either or  is NaN, NaN is returned