United States-English |
|
|
HP-UX Reference > Rremainder(3M)HP-UX 11i Version 3: February 2007 |
|
NAMEremainder(), remainderf(), remainderl(), remainderw(), remainderq() — remainder functions DESCRIPTIONThe 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 | = ½, the value n is chosen to be even. The remainder() function is independent of the rounding mode. Integrity Server Onlyremainderf() is a float version of remainder(); it takes float arguments and returns a float result. remainderl() is a long double version of remainder(); it takes long double arguments and returns a long double result. remainderw() is an extended version of remainder(); it takes extended arguments and returns an extended result. remainderq() is equivalent to remainderl() on HP-UX systems. USAGETo 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() or remainderq(), compile also with the -fpwidetypes option. Make sure your program includes <math.h>. Link in the math library by specifying -lm on the compiler or linker command line. RETURN VALUEIf 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. |
Printable version | ||
|