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

Functions

float modff (float x, float *iptr)
 Break into fractional and integral parts. More...
 

Function Documentation

◆ modff()

float modff ( float  x,
float *  iptr 
)

Break into fractional and integral parts.

The modff 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 modff functions return the signed fractional part of value.