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

OSS Library Calls (n - r) pow(3)
NAME
pow - Computes the power function
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRESRL
G-series native OSS processes: /G/system/sysnn/zcresrl
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 pow(
double x,
double y
);
PARAMETERS
x Specifies a double value.
y Specifies a double value.
DESCRIPTION
The pow( ) function computes the value of x raised to the power of y (x
y
).
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 Programmer’s Guide for a discussion of floating-point conversions.
RETURN VALUES
The pow( ) function returns the value of x raised to the power of y (x
y
).
The pow(x,0.0) function call returns 1.0 for all values of x. The pow(x,-0.0) function call returns
1.0 for all values of x.
If the correct value would cause overflow, then positive or negative HUGE_VAL is returned and
errno is set to [ERANGE]. If the correct value would cause underflow, then 0.0 (zero) is
returned and errno is set to [ERANGE].
For Tandem floating-point data:
If the value of x is 0.0 (zero) and the value of y is negative, -HUGE_VALis returned
and errno is set to [EDOM].
If the value of x is 0.0 (zero) and the value of y is greater than 0.0 (zero), 0.0 (zero) is
returned.
If the value of x is less than 0.0 (zero) and the value of y is not an integral value,
HUGE_VAL is returned and errno is set to [EDOM].
527187-017 Hewlett-Packard Company 557