Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

scalbn(3) OSS Library Calls Reference Manual
NAME
scalbn - Computes the exponent of a radix-independent floating-point number
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>
double scalbn(
double x,
int n
);
PARAMETERS
x Is the double value to be multiplied.
n Is the exponent of the radix.
DESCRIPTION
The scalbn( ) function calculates the value of x * r
n
, for integral values of n, where r is the radix
of the machine’s floating-point arithmetic. When r is 2, the scalbn( ) function is equivalent to the
ldexp( ) function.
NOTES
This function is implemented only for the IEEE_float oating-point option. Applications using
this function cannot be compiled if the specified floating-point option is Tandem_float.
RETURN VALUES
Upon successful completion, scalbn( ) returns the value of x * r
n
.
If the value of x is Nan, NaN is returned.
If the value of x is positive or negative zero or positive or negative infinity, x is returned.
If the value of n is 0 (zero), x is returned.
If the result would cause overflow, the scalbn( ) function returns +HUGE_VAL or -HUGE_VAL
(according to the sign of x ) and sets errno to [ERANGE].
If the correct value would cause underflow, the scalbn( ) function returns 0.0 (zero) and sets
errno to [ERANGE].
ERRORS
If any of the following conditions occurs, the scalbn( ) function sets errno to the corresponding
value:
[ERANGE] The result would cause underflow or overflow.
RELATED INFORMATION
Functions: ilogb(3), ldexp(3), logb(3), scalb(3), scalbnf(3), scalbnl(3), scalbln(3).
Files: math(4).
STANDARDS CONFORMANCE
This function conforms to the ISO/IEC 9899:1999 standard.
This function conforms to the IEEE Std 1003.1, 2004 Edition.
610 Hewlett-Packard Company 527187-017