IEEE(3) BSD Programmer's Manual IEEE(3)
copysign, copysignf, finite, finitef, ilogb, ilogbf, nextafter,
nextafterf, remainder, remainderf, scalbn, scalbnf - functions for IEEE
arithmetic
libm
#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);
These functions are required or recommended by IEEE Std 754-1985.
copysign() returns x with its sign changed to y's.
finite() returns the value 1 just when -Infinity < x < +Infinity; other-
wise a zero is returned (when |x| = Infinity or x is NaN).
ilogb() returns x's exponent n, in integer format. ilogb(+-Infinity) re-
turns INT_MAX and ilogb(0) returns INT_MIN.
nextafter() returns the next machine representable number from x in
direction y.
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.
scalbn() returns x*(2**n) computed by exponent manipulation.
math(3)
IEEE Std 754-1985
The ieee functions appeared in 4.3BSD.
MirOS BSD #10-current February 25, 1994 1
Generated on 2011-09-14 21:16:01 by $MirOS: src/scripts/roff2htm,v 1.67 2011/09/14 21:08:34 tg Exp $
These manual pages and other documentation are copyrighted by their respective writers;
their source is available at our CVSweb,
AnonCVS, and other mirrors. The rest is Copyright © 2002‒2011 The MirOS Project, Germany.
This product includes material
provided by Thorsten Glaser.
This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report – diffs preferred.