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 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].
For IEEE floating-point data:
• If the value of x is NaN and the value of y is not 0.0 (zero), NaN is returned.
5−22 Hewlett-Packard Company 527192-005