Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

powf(3) Guardian Native C Library Calls Reference Manual
NAME
powf - Computes the power function for a float value
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>
float powf(
float x,
float y
);
PARAMETERS
x Species a float value.
y Species a float value.
DESCRIPTION
The powf() function is a float version of the pow() function; it takes float arguments and returns
a float result.
The powf() 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 Programmers Guide for a discussion of floating-point conversions.
RETURN VALUES
The powf() function returns the value of x raised to the power of y (x
y
).
The powf(x,0.0) function call returns 1.0 for all values of x. The powf(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_VALF 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_VALF is 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_VALF is returned and errno is set to [EDOM].
546 Hewlett-Packard Company 527192-018