frexpl [V1.08 or later]


Divide floating-point number into mantissa and power

[Classification]

Mathematical library

[Syntax]

#include <math.h>

long double __far frexpl(long double val, int *exp); (C99)

[Return value]

Returns the mantissa of val. The value to be returned ranges between [1 / 2, 1) or is 0.

frexpl sets 0 to *exp and returns 0 if val is 0.

If val is a Not-a-Number (NaN) or ±∞, frexpl returns a Not-a-Number (NaN) and sets 0 to *exp and macro EDOM to global variable errno.

[Description]

Divides a floating-point number into a normalized number and an integral power of 2. The integral power of 2 is stored in *exp.

This function expresses val of long double type as mantissa m and the pth power of 2. The resulting mantissa m is 0.5 <= | m | < 1.0, unless val is zero. p is stored in *exp. m and p are calculated so that val = m * 2 p.