|
|
HP-UX Reference > Ffmod(3M)HP-UX 11i Version 2: December 2007 Update |
|
NAMEfmod(), fmodf(), fmodl(), fmodw(), fmodq() — remainder functions DESCRIPTIONThe fmod() function returns the floating-point remainder (f) of the division of x by y, where f has the same sign as x, such that x=iy+f for some integer i, and |f| < |y|. fmodf() is a float version of fmod(); it takes float arguments and returns a float result. USAGETo use these functions compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options. To use (for Itanium-based systems) fmodw() or fmodq(), compile also with the -fpwidetypes option. To use any of these functions, 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, fmod() returns x. If x is ±zero and y is a nonzero number, fmod() returns x. If x or y is NaN, fmod() returns NaN. If x is ±INFINITY or y is zero, fmod() returns NaN and raises the invalid exception. |
|