remainder.3m (2010 09)

r
remainder(3M) remainder(3M)
NAME
remainder(), remainderf(), remainderl(), remainderw(), remainderq(), drem(), dremf(), dreml(), dremw(),
dremq() - remainder functions
SYNOPSIS
#include <math.h>
double remainder(double
x , double y );
HP Integrity Server Only
float remainderf(float
x , float y );
long double remainderl(long double
x , long double y );
extended remainderw(extended
x , extended y
);
quad remainderq(quad x, quad y);
double drem(double x, double y);
float dremf(float x, float y);
long double dreml(long double x, long double
y );
extended dremw(extended x
, extended y);
quad dremq(quad x, quad 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() function is independent of the rounding mode.
Integrity Server Only
drem() is equivalent to remainder(). It is provided in HP-UX to facilitate importing code from other
platforms.
remainderf() and dremf() are float versions of remainder() and drem(); they take float
arguments and returns a float result.
remainderl() and dreml() are long double versions of remainder() and drem(); they take
long double arguments and returns a long double result.
remainderw() and dremw() are extended version of remainder() and drem(); they take
extended arguments and returns an extended result.
remainderq() and dremq() are equivalent to remainderl() and dreml() on HP-UX systems.
USAGE
To use these functions, compile either with the default
-Ae option or with the -Aa and
-D_HPUX_SOURCE options.
To use (for Integrity servers)
remainderw(), remainderq(), dremw(),ordremq(), compile also
with the -fpwidetypes option.
Make sure your program includes
<math.h>. Link in the math library by specifying -lm on the com-
piler 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 raises the invalid exception.
If x is ±INFINITY,
remainder() returns NaN and raises the invalid exception.
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (2 pages)