Mojo function
exp
exp[dtype: DType, width: Int, //](x: SIMD[dtype, width]) -> SIMD[dtype, width]
Calculates elementwise exponential of the input vector.
Given an input vector and an output vector , sets for each position in the input vector (where is the mathematical constant ).
Constraints:
The input must be a floating-point type.
Parameters:
- dtype (
DType
): Thedtype
of the input and output SIMD vector. - width (
Int
): The width of the input and output SIMD vector.
Args:
- x (
SIMD[dtype, width]
): The input SIMD vector.
Returns:
A SIMD vector containing raised to the power where is an element in the input SIMD vector.
exp[T: _Expable](x: T) -> T
Computes the exponential of the input value.
Parameters:
- T (
_Expable
): The type of the input value.
Args:
- x (
T
): The input value.
Returns:
The exponential of the input value.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!