Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

frexpl(3) Guardian Native C Library Calls Reference Manual
NAME
frexpl - Breaks a long double number into a fraction and a power of 2
LIBRARY
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcredll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycredll
SYNOPSIS
#include <math.h>
long double frexpl(
long double value,
int *exp
);
PARAMETERS
value Species the long double value to be broken into a fraction and a power of 2.
exp Is an integer pointer specifying where to store the exponent of 2.
DESCRIPTION
Every nonzero number can be written uniquely as x times 2 raised to the power n, where the
mantissa (fraction), x, is in the range 0.5 |x| < 1.0, and the exponent, n, is an integer.
The frexpl() function is a long double version of the frexp() function; it takes a long double
argument and returns a long double result.
The frexpl() function breaks the floating-point number value into a normalized fraction and an
integral power of 2. It stores the integral power of 2 in the int object pointed to by the exp
parameter and returns the normalized fraction part.
NOTES
This function supports both IEEE Std 754-1985 floating-point and Tandem floating-point values
in the native environment. IEEE values can include NaN and infinity, and the sign of 0.0 (zero)
can be either positive or negative. Refer to the fp_class(3) reference page for a description of
IEEE value classes.
Guardian functions are available to convert between floating-point formats. Refer to the Guar-
dian Programmers Guide for a discussion of floating-point conversions.
RETURN VALUES
Upon successful completion, the frexpl() function returns the value x such that x is a long double
number with magnitude in the interval 1/2 to 1, or 0.0 (zero), and value equals x times 2 raised to
the power of *exp.
If the value of value is 0.0 (zero), both the returned function value and the returned value of *exp
are zero.
For IEEE floating-point values, if the value of value is NaN, then the returned function value is
NaN. If the value of value is positive or negative infinity, then the returned function value is the
value of value and errno is set to [EDOM].
ERRORS
If any of the following conditions occurs, the frexpl() function sets errno to the corresponding
value:
[EDOM] The value parameter is infinity.
2128 Hewlett-Packard Company 527192-018