MicrOS
modf.c File Reference
#include "../math.h"

Functions

double modf (double x, double *iptr)
 Break into fractional and integral parts. More...
 

Function Documentation

◆ modf()

double modf ( double  x,
double *  iptr 
)

Break into fractional and integral parts.

The modf functions break the argument value into integral and fractional parts, each of which has the same type and sign as the argument. They store the integral part (in floating-point format) in the object pointed to by iptr.

Parameters
xFloating point value to break into parts.
iptrPointer to an object (of the same type as x) where the integral part is stored with the same sign as x.
Returns
The modf functions return the signed fractional part of value.