HP-UX Reference (11i v1 00/12) - 3 Library Functions N-Z (vol 7)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/nan.3m
________________________________________________________________
___ ___
r
remainder(3M) remainder(3M)
NAME
remainder() - remainder function
SYNOPSIS
#include <math.h>
double remainder(double x, double y);
DESCRIPTION
The remainder() function returns the floating-point remainder r = x − ny when y is a nonzero number.
The value n is the integral value nearest the exact value x/y; when n − x/y =⁄
1
2, the value n is chosen to
be even.
The remainder() is independent of the rounding mode.
This function meets the requirement of the IEEE-754 standard for a remainder operation. The ISO/ANSI
C committee has approved the remainder() function for inclusion in the C9X draft standard.
To use this function, compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE
options. Make sure your program includes <math.h
>. Link in the math library by specifying -lm on the
compiler or linker command line.
RETURN VALUE
If y is ±INFINITY and x is not ±INFINITY,
remainder() returns x.
If x is ±zero and y is a nonzero number,
remainder() returns x.
If x or y is NaN,
remainder() returns NaN.
If y is zero, remainder() returns NaN and sets errno to [EDOM].
If x is ±INFINITY, remainder() returns NaN and sets
errno to [EDOM].
ERRORS
If
remainder() fails, errno is set to one of the following values.
[EDOM] y is zero.
[EDOM] x is ±INFINITY.
SEE ALSO
fmod(3M), fabs(3M), remquo(3M), math(5).
STANDARDS CONFORMANCE
remainder() : SVID3, XPG4.2, IEEE-754
HP-UX Release 11i: December 2000 − 1 − Section 3−−763
___
___