pow
Calculates the x (base value) ^ y (power exponent).
Vectorization: This function supports vectorization in the 1st and 2nd function parameters.
Instead of providing a single value, you can provide a set or even a nested set which contain multiple values.
The function will then process every value and its return value contains a corresponding set containing all results.
Indirect parameter passing is disabled
Vectorization is allowed in the 1st and 2nd function parameters
2
No. | Type | Description |
---|---|---|
1 input |
numeral set |
Base value Value or set containing values (vectorization) to be raised to the power exponent |
2 input |
numeral set |
Exponent Exponent Value or set containing values (vectorization) Default value: 1 |
Type | Description |
---|---|
numeral set |
Result Calculated result |
Value provided is not a numeral
rounding intervals is negative or zero
echo( pow( 7, 2 ) );
echo( pow( 3, 3 ) );
echo( pow( 81, 0.5 ) );
echo( pow( 27, 1/3 ) );
echo( pow( 2, {2,3} ) ); // Vectorized
echo( pow( {2,3}, 2 ) ); // Vectorized
echo( pow( {2,3}, {3,4} ) ); // Vectorized both parameters
49
27
9
3
{4,8}
{4,9}
{8,81}