Table of Contents        Previous topic       Next topic       

C LIBRARY FUNCTIONS->Detailed Descriptions->frexp() frexpl()


#include <math.h>
double frexp(double x, int *exp)Break into fraction and exponent
long double frexpl(long double x, int *exp)Break into fraction and exponent to long double precision

xFloating point value
expPointer to integer to receive the exponent


These functions break the floating point value of x into a mantissa (m) and an exponent (e) such that the mantissa is in the range 0.5 to 1.0 and x equals 2 to the power e times m.


These functions return the mantissa.  If x is zero, then both parts of the result (mantissa and exponent) are zero.  There is no error return.