Mojo function
pow
pow[T: Powable](base: T, exp: T) -> $0
Computes the base
raised to the power of the exp
.
Parameters:
- βT (
Powable
): A type conforming to thePowable
trait.
Args:
- βbase (
T
): The base of the power operation. - βexp (
T
): The exponent of the power operation.
Returns:
The base
raised to the power of the exp
.
pow(base: SIMD[type, size], exp: Int) -> SIMD[$0, $1]
Computes elementwise value of a SIMD vector raised to the power of the given integer.
Args:
- βbase (
SIMD[type, size]
): The first input argument. - βexp (
Int
): The second input argument.
Returns:
The base
elementwise raised raised to the power of exp
.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!
π What went wrong?