logbd32, logbd64, and logbd128 Subroutines

Purpose

Computes the radix-independent exponent.

Syntax

#include <math.h>

_Decimal32 logbd32 (x)
_Decimal32 x;

_Decimal64 logbd64 (x)
_Decimal64 x;

_Decimal128 logbd128 (x)
_Decimal128 x;

Description

The logbd32, logbd64, and logbd128 subroutines compute the exponent of x, which is an integral part of logr | x |, as a signed floating-point value, for nonzero x. In the logr | x |, the r is the radix of the machine's decimal floating-point arithmetic. For AIX®, FLT_RADIX r=10.

An application that wants to check for error situations must set the errno to zero and call the feclearexcept(FE_ALL_EXCEPT) before calling these subroutines. On return, if the errno is of the value of nonzero or fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) is of the value of nonzero, an error has occurred.

Parameters

Item Description
x Specifies the value to be computed.

Return Values

Upon successful completion, the logbd32, logbd64, and logbd128 subroutines return the exponent of x.

If x is ±0, a pole error occurs and the logbd32, logbd64, and logbd128 subroutines return -HUGE_VAL_D32, -HUGE_VAL_D64, and -HUGE_VAL_D128, respectively.

If x is NaN, a NaN is returned.

If x is ±Inf, +Inf is returned.