IEEE(3)

NAME
copysign, copysignf, finite, finitef, ilogb, ilogbf, nextafter, nextafterf, remainder, remainderf, scalbn, scalbnf - Functions for IEEE arithmetic

SYNOPSIS
#include <math.h>
double
copysign(double x, double y);
float
copysignf(float x, float y);
int
finite(double x);
int
finitef(float x);
int
ilogb(double x);
int
ilogbf(float x);
double
nextafter(double x, double y);
float
nextafterf(float x, float y);
double
remainder(double x, double y);
float
remainderf(float x, float y);
double
scalbn(double x, int n);
float
scalbnf(float x, int n);

DESCRIPTION
These functions are required or recommended by ieee754.

copysign() and copysignf() return x with its sign changed to y's.

finite() and finitef() return the value 1 just when - x +; otherwise a zero is returned (when \*(Bax\*(Ba = or x is

ilogb() and ilogbf() return x's exponent n, in integer format. ilogb() returns INT_MAX and ilogb(0) returns INT_MIN.

nextafter() and nextafterf() return the next machine representable number from x in direction y.

remainder() and remainderf() return the remainder r := x - n*y where n is the integer nearest the exact value of x/y; moreover if \*(Ban - x/y\*(Ba = 1/2 then n is even. Consequently the remainder is computed exactly and \*(Bar\*(Ba \*(Bay\*(Ba/2. But remainder(x, 0) and remainder(, 0) are invalid operations that produce a .

scalbn() and scalbnf() return x*(2**n) computed by exponent manipulation.

SEE ALSO
math(3)

HISTORY
The ieee functions appeared in 4.3BSD.

STANDARDS
ieee754