modf
separate integral and fractional parts
Synopsis
#include <math.h>
double modf(double f, double *fraction);
float modff (float f, float *fraction);
Description
The
function separates the first argument into integral and fractional
modf
portions. The fractional portion is returned and the integral portion is
stored in the object pointed to by the second argument. The integral and
fractional portions have the same sign as the input.
Error Conditions
The
function does not return an error condition.
modf
Example
#include <math.h>
double y, n;
y = modf(-12.345, &n);
See Also
frexp
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
for ADSP-219x DSPs
C/C++ Run-Time Library
/* y = -0.345, n = -12.0 */
3-103
Need help?
Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?
Questions and answers