ieee_functions(3M)
NAME
ieee_functions, isnan, fabs, fmod, nextafter, remainder − appendix and related miscellaneous functions for IEEE arithmetic
SYNOPSIS
#include <math.h>
int isnan(double x);
double fabs(double x);
double nextafter(double x, double y);
double fmod(double x, double y);
double remainder(double x, double y);
DESCRIPTION
Most of these functions provide capabilities required by ANSI/IEEE Std 754-1985 or suggested in its appendix.
isnan(x) returns 1 if x is NaN; otherwise it returns 0.
fabs(x) returns the absolute value of x.
nextafter(x,y) returns the next machine representable number from x in the direction y.
remainder(x,y) and fmod(x,y) return a remainder of x with respect to y; that is, the result r is one of the numbers that differ from x by an integral multiple of y. Thus (x−r)/y is an integral value, even though it might exceed MAXINT, the largest int defined in <values.h> if it were explicitly computed as an int. Both functions return one of the two such r smallest in magnitude. remainder(x,y) is the operation specified in ANSI/IEEE Std 754-1985; the result of fmod(x,y) may differ from remainder’s result by ±y. The magnitude of remainder’s result cannot exceed half that of y; its sign might not agree with either x or y. The magnitude of fmod’s result is less than that of y; its sign agrees with that of x. Neither function can generate an exception as long as both arguments are normal or subnormal.
remainder(x,0), fmod(x,0), remainder(∞,y), and fmod(∞,y) are invalid operations that produce a NaN.
FILES
/usr/include/math.h
/usr/include/values.h
/usr/ccs/lib/libm.a
SEE ALSO
SunOS 5.1/SPARC — Last change: 30 Apr 1992