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

Functions

float frexpf (float x, int *exp)
 Get significand and exponent. More...
 

Function Documentation

◆ frexpf()

float frexpf ( float  x,
int *  exp 
)

Get significand and exponent.

The frexpf functions break a floating-point number into a normalized fraction and an integral power of 2. They store the integer in the int object pointed to by exp.

Parameters
xValue to be decomposed.
expPointer to an int where the value of the exponent is stored.
Returns
If value is not a floating-point number or if the integral power of 2 is outside the range of int, the results are unspecified. Otherwise, the frexpf functions return the value x, such that x has a magnitude in the interval [1/2, 1) or zero, and value equals x × 2^exp. If value is zero, both parts of the result are zero.