MODF - obtain fractional and integer part.

(ANSI Standard)

Usage:

#include <math.h>
z = modf( x, yp );

Where:

double x, *yp, z;
 

Description:

"modf" returns the fractional part of "x" and stores the integer part in the memory location pointed to by "yp". The value returned by "modf" is the same sign as "x". For example,

modf(2.3,&i)

returns 0.3 and puts 2 in "i".

modf(-2.3,&i)

returns -0.3 and puts -2 in "i".

Copyright © 1996, Thinkage Ltd.