NEXTAFTER(3)

NAME
nextafter, nextafterf - get next number

SYNOPSIS

#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.

PORTABILITY

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