HP-UX Reference (11i v1 00/12) - 3 Library Functions A-M (vol 6)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/!!!intro.3c
________________________________________________________________
___ ___
m
modf(3M) modf(3M)
NAME
modf() - decompose floating-point number
SYNOPSIS
#include <math.h>
double modf(double x, double *iptr);
DESCRIPTION
The modf() function breaks the argument x into integral and fractional parts, each of which has the same
sign as the argument. It stores the integral part as a double in the object pointed to by iptr.
To use this function, make sure your program includes <math.h>, and link in the math library by specify-
ing -lm on the compiler or linker command line.
RETURN VALUE
Upon successful completion, the modf() function returns the signed fractional part of x.
If x is NaN, modf() returns NaN.
If the correct value after rounding would be smaller in magnitude than
MINDOUBLE, modf() returns
zero.
ERRORS
No errors are defined.
SEE ALSO
frexp(3M), ldexp(3M), scalb(3M), scalbn(3M),math(5), values(5).
STANDARDS CONFORMANCE
modf(): SVID3, XPG4.2, ANSI C
HP-UX Release 11i: December 2000 1 Section 3525
___
___