C Run-Time Library Reference
frexp
separate fraction and exponent
Synopsis
#include <math.h>
double frexp(double f, int *expptr);
float frexpf(float f, int *expptr);
Description
The
function separates a floating-point input into a normalized
frexp
fraction and a (base 2) exponent. The function returns the first argument
as a fraction in the interval [½, 1), and stores a power of 2 in the integer
pointed to by the second argument. If the input is zero, then the fraction
and exponent will both be set to zero.
Error Conditions
The
function does not return an error condition.
frexp
Example
#include <math.h>
double y;
int exponent;
y = frexp(2.0, &exponent);
See Also
modf
3-62
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
/* y=0.5, exponent=2 */
for ADSP-219x DSPs
Need help?
Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?
Questions and answers