Skip to content

nextafter, nextafterf : get next number

#include <math.h>
double nextafter(double val, double dir);
float nextafterf(float val, float dir);
```### 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.
---
**Authoritative source**: BUSMASTER DITA help source `nextafter.dita`, compiled into `BUSMASTER.CHM` with the application.