·  Home
+   man pages
 -> Linux -> FreeBSD -> OpenBSD -> NetBSD -> Tru64 Unix -> HP-UX 11i -> IRIX
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

man pages->OpenBSD man pages -> ieee (3)
 Title
 Content
 Arch
 Section All Sections 1 - General Commands 2 - System Calls 3 - Subroutines 4 - Special Files 5 - File Formats 6 - Games 7 - Macros and Conventions 8 - Maintenance Commands 9 - Kernel Interface n - New Commands

## IEEE(3)

```
```

### NAME[Toc][Back]

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

### SYNOPSIS[Toc][Back]

```     #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[Toc][Back]

```     These functions are required  or  recommended  by  IEEE  Std
754-1985.

copysign()  returns  x  with  its  sign changed to y's.  The
copysignf() function
is a single precision version of copysign().

finite() returns the value 1 just when -Infinity < x <  +Infinity; otherwise
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 version
of remainder().

scalbn() returns x*(2**n) computed by exponent manipulation.
The
scalbnf()  function  is  a  single  precision   version   of
scalbn().
```

```     math(3)
```

### STANDARDS[Toc][Back]

```     IEEE Std 754-1985
```

### HISTORY[Toc][Back]

```     The ieee functions appeared in 4.3BSD.

OpenBSD      3.6                        February     25,     1994
```
[ Back ]
Similar pages
 Name OS Title ieee_functions Tru64 Related miscellaneous IEEE arithmetic functions. nextafter Tru64 Related miscellaneous IEEE arithmetic functions. unordered Tru64 Related miscellaneous IEEE arithmetic functions. copysign Tru64 Related miscellaneous IEEE arithmetic functions. isnan Tru64 Related miscellaneous IEEE arithmetic functions. finite Tru64 Related miscellaneous IEEE arithmetic functions. fp_class Tru64 Related miscellaneous IEEE arithmetic functions. significandf FreeBSD IEEE test functions scalbf FreeBSD IEEE test functions ieee_test NetBSD IEEE test functions