# Minix Man Pages

home | helpNEXTAFTER(3) BSD Library Functions Manual NEXTAFTER(3)NAMEnextafter,nextafterf,nextafterl,nexttoward-- next representable floating-point numberLIBRARYMath Library (libm, -lm)SYNOPSIS#include<math.h>doublenextafter(doublex,doubley);floatnextafterf(floatx,floaty);longdoublenextafterl(longdoublex,longdoubley);doublenexttoward(doublex,longdoubley);DESCRIPTIONThenextafter(),nextafterf(), andnextafterl() functions return the next machine representable number fromxin direction ofy. In other words, ifyis less thanx, the functions return the largest representable floating-point number less thanx. Whenxequalsy, the value ofyis returned. The three functions differ only in the type of the return value andx. Thenexttoward() function is equivalent to thenextafter() family of functions with two exceptions: 1. The second parameter has a typelongdouble. 2. The return value isyconverted to the type of the function, provided thatxequalsy.RETURN VALUESUpon successful completion, the described functions return the next representable floating-point value as described above. Ifxis finite but an overflow would occur, a range error follows and the functions return +-HUGE_VAL, +-HUGE_VALF, or +-HUGE_VALL with the same sign asx. When eitherxoryisNaN, aNaNis returned. Whenxis notybut the function value is subnormal, zero, or underflows, a range error occurs, and either 0.0 or the correct function value (if representable) is returned.SEE ALSOmath(3)STANDARDSThe described functions conform to ISO/IEC 9899:1999 (``ISO C99''). BSD September 18, 2011 BSD

NAME | LIBRARY | SYNOPSIS | DESCRIPTION | RETURN VALUES | SEE ALSO | STANDARDS