Computes the exponent using FLT_RADIX=10.
#include <math.h>
_Decimal32 scalblnd32 (x, n)
_Decimal32 x;
long n;
_Decimal64 scalblnd64 (x, n)
_Decimal64 x;
long n;
_Decimal128 scalblnd128 (x, n)
_Decimal128 x;
long n;
_Decimal32 scalbnd32 (x, n)
_Decimal32 x;
int n;
_Decimal64 scalbnd64 (x, n)
_Decimal64 x;
int n;
_Decimal128 scalbnd128 (x, n)
_Decimal128 x;
int n;
The scalblnd32, scalblnd64, scalblnd128, scalbnd32, scalbnd64, and scalbnd128 subroutines compute x * FLT_RADIXn efficiently, not normally, by computing FLT_RADIXn explicitly. For AIX®, FLT_RADIX =10.
An application checking for error situations must set the value of the errno global variable to zero and call the feclearexcept(FE_ALL_EXCEPT) subroutine before calling any of these subroutines. Upon return, if the value of the errno global variable is nonzero or the fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) subroutine is nonzero, an error has occurred.
Item | Description |
---|---|
x | Specifies the value to be computed. |
n | Specifies the exponent of 10. |
Upon successful completion, the scalblnd32, scalblnd64, scalblnd128, scalbnd32, scalbnd64, and scalbnd128 subroutines return x * FLT_RADIXn.
If the result causes overflow, a range error occurs and the scalblnd32, scalblnd64, scalblnd128, scalbnd32, scalbnd64, and scalbnd128 subroutines return ±HUGE_VAL_D32, ±HUGE_VAL_D64, and ±HUGE_VAL_D128 (according to the sign of x) as appropriate for the return type of the function.
If the correct value causes underflow and is not representable, a range error occurs and 0.0 is returned.
If x is NaN, a NaN is returned.
If x is ±0 or ±Inf, x is returned.
If n is 0, x is returned.
If the correct value causes underflow and is representable, a range error occurs and the correct value is returned.