cc [ flag ... ] file ... -lm [ library ... ]
#include <math.h>
int ilogb(double x);
int isnan(double x);
double copysign(double x, double y);
double fabs(double x);
double fmod(double x, double y);
double nextafter(double x, double y);
double remainder(double x, double y);
double scalbn(double x, int n);
MT-Safe
ilogb(x) returns the unbiased exponent of x in integer format. ilogb(±if) = +MAXINT and ilogb(0) = -MAXINT ; <values.h> defines MAXINT as the largest int. ilogb(x) never generates an exception. When x is subnormal, ilogb(x) returns an exponent computed as if x were first normalized.
isnan(x) returns 1 if x is ; otherwise it returns 0.
copysign(x,y) returns a value with the magnitude of x and with the sign bit of y.
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(if,y), and fmod(if,y) are invalid operations; in IEEE754 mode (i.e. the -xlibmieee cc compilation option), a is returned.
scalbn(x,n) returns x*2**n computed by exponent manipulation rather than by actually performing an exponentiation or a multiplication. Thus
for every x except 0, infinity, if, and .