copapy.pow#
- copapy.pow(x, y)#
x to the power of y. The result is an int if both operands are int, otherwise a float. An int power is exact up to the wrap around of 32 bit ints on overflow, a negative int exponent gives 1 / x^-y truncated towards zero (0 for |x| > 1 and for x = 0).
- Overloads:
x (
int), y (int) →intx (
float|int), y (float|int) →floatx (
value[Any]), y (value[int] |value[float] |int|float) →value[float]x (
value[int] |value[float] |int|float), y (value[Any]) →value[float]x (
vector[int]), y (vector[int] |value[int] |int) →vector[int]x (
vector[Any]), y (vector[Any] |value[Any] |int|float|bool) →vector[float]x (
vector[Any] |value[Any] |int|float|bool), y (vector[Any]) →vector[float]x (
tensor[int]), y (tensor[int] |vector[int] |value[int] |int|bool) →tensor[int]x (
tensor[int] |vector[int] |value[int] |int|bool), y (tensor[int]) →tensor[int]x (
tensor[Any]), y (tensor[Any] |vector[Any] |value[Any] |int|float|bool) →tensor[float]x (
tensor[Any] |vector[Any] |value[Any] |int|float|bool), y (tensor[Any]) →tensor[float]x (
array[int]), y (array[int] | value[int] | int) →array[int]x (
array[Any]), y (array[Any] | value[int] | value[float] | int | float) →array[float]x (
value[int] |value[float] |int|float), y (array[Any]) →array[float]
- Parameters:
x (
Any) – Input valuey (
Any) – Exponent
- Returns:
result of x**y