frexpd32, frexpd64, and frexpd128 Subroutines

Purpose

Extracts the mantissa and exponent from a decimal floating-point number.

Syntax

#include <math.h>

_Decimal32 frexpd32 (num, exp)
_Decimal32 num;
int *exp;

_Decimal64 frexpd64 (num, exp)
_Decimal64 num;
int *exp;

_Decimal128 frexpd128 (num, exp)
_Decimal128 num;
int *exp;

Description

The frexpd32, frexpd64, and frexpd128 subroutines divide a decimal floating-point number into a mantissa and an integral power of 10. The integer exponent is stored in the int object pointed to by the exp parameter.

Parameters

Item Description
num Specifies the decimal floating-point number to be divided into a mantissa and an integral power of 10.
exp Points to where the integer exponent is stored.

Return Values

For finite arguments, the frexpd32, frexpd64, and frexpd128 subroutines return the mantissa value in the x parameter. Therefore, the num parameter equals the x parameter times 10 raised to the power exp parameter.

If num is NaN, a NaN is returned, and the value of the *exp is not specified.

If num is ±0, ±0 is returned, and the value of the *exp is 0.

If num is ±Inf, num is returned, and the value of the *exp is not specified.