Index of Section 3 Manual Pages
| Interix / SUA | finitef.3 | Interix / SUA |
IEEE(3) System Library Functions Manual IEEE(3)
NAME
copysign, copysignf, finite, finitef, ilogb, ilogbf, nextafter,
nextafterf, remainder, remainderf, scalbn, scalbnf - functions for IEEE
arithmetic
SYNOPSIS
#include
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 IEEE Std 754-1985.
copysign() returns x with its sign changed to y's. The copysignf() func-
tion is a single precision version of copysign().
finite() returns the value 1 just when -infinity < x < +infinity; other-
wise a zero is returned (when |x| = infinity or x is NaN. The finitef()
function is a single precision version of finite().
ilogb() returns x's exponent n, in integer format. ilogb(+-infinity)
returns INT_MAX and ilogb(0) returns INT_MIN. The ilogbf() function is a
single precision version of ilogb().
nextafter() returns the next machine representable number from x in
direction y. The nextafterf() function is a single precision version of
nextafter().
remainder() returns the remainder r := x - n*y where n is the integer
nearest the exact value of x/y; moreover if |n - x/y| = 1/2 then n is
even. Consequently, the remainder is computed exactly and |r| <= |y|/2.
But remainder(x, 0) and remainder(infinity, 0) are invalid operations
that produce a NaN. The remainderf() function is a single precision ver-
sion of remainder().
scalbn() returns x*(2**n) computed by exponent manipulation. The
scalbnf() function is a single precision version of scalbn().
SEE ALSO
math(3)
STANDARDS
IEEE Std 754-1985
HISTORY
The ieee functions appeared in 4.3BSD.
Interix May 31 2007 Interix