Guardian Native C Library Calls Reference Manual (G06.28+, H06.04+)

pow(3) Guardian Native C Library Calls Reference Manual
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 native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
H-series OSS processes: /G/system/zdllnnn/zcredll
SYNOPSIS
#include <math.h>
double pow(
double x,
double y
);
PARAMETERS
x Species a double value.
y Species 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 oating-point and Tandem oating-point values
in the native environment. IEEE values can include NaN and innity, 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 oating-point formats. Refer to the Guar-
dian Programmers Guide for a discussion of oating-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 overow, then positive or negative HUGE_VAL is returned and
errno is set to [ERANGE]. If the correct value would cause underow, then 0.0 (zero) is
returned and errno is set to [ERANGE].
For Tandem oating-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].
For IEEE oating-point data:
If the value of x is NaN and the value of y is not 0.0 (zero), NaN is returned.
522 Hewlett-Packard Company 527192-005