`nextafter`

, `nextafterf`

---get next number#include <math.h> double nextafter(doubleval, doubledir); float nextafterf(floatval, floatdir);

**Description**

`nextafter`

returns the double) precision floating point number
closest to `val` in the direction toward `dir`. `nextafterf`

performs the same operation in single precision. For example,
`nextafter(0.0,1.0)`

returns the smallest positive number which is
representable in double precision.

**Returns**

Returns the next closest number to `val` in the direction toward
`dir`.

**Portability**

Neither `nextafter`

nor `nextafterf`

is required by ANSI C
or by the System V Interface Definition (Issue 2).

Go to the first, previous, next, last section, table of contents.