__pow_ii() — Raise to a power (I**I)

Standards

Standards / Extensions C or C++ Dependencies

Language Environment

both  z/OS V1R7

Format

#include <math.h>

int __pow_ii(int x, int y);

General description

The __pow_ii() function calculates the value of x to the power of y and is a C interface to the LE Math Service CEESIXPI. Information about the LE Math Service CEESIXPI can be found in the following publications:
Note: The following table shows the viable formats for these functions. See IEEE binary floating-point for more information about IEEE Binary Floating-Point.
Function Hex IEEE
__pow_ii X X

Returned value

If successful, __pow_ii() returns the value of x to the power of y.

If... Then...
x is not equal to 0 and y is 0 1 is returned.
x is 0 and y is positive 0 is returned.
x is 0 and y is negative INT_MAX is returned and errno is set to EDOM.
x and y are 0 0 is returned and errno is set to EDOM.
x is 1 and y is negative 1 is returned.
x is -1 and y is negative ±1 is returned.
x is greater than 1 and y is negative 0 is returned and errno is set to EDOM.
x is less than -1 and y is negative 0 is returned and errno is set to EDOM.
The values of x and y cause an overflow and x is less than 0 or y is odd. errno is set to ERANGE and the function returns INT_MIN
The values of x and y cause an overflow and x is greater than 0 or y is even. errno is set to ERANGE and the function returns INT_MAX

Related information