Skip to main content
Log in

Mojo function

tanh

tanh[type: DType, simd_width: Int, //](x: SIMD[type, simd_width]) -> SIMD[$0, $1]

Performs elementwise evaluation of the tanh function.

Parameters:

  • ​type (DType): The dtype of the input and output SIMD vector.
  • ​simd_width (Int): The width of the input and output SIMD vector.

Args:

  • ​x (SIMD[type, simd_width]): The vector to perform the elementwise tanh on.

Returns:

The result of the elementwise tanh operation.

Was this page helpful?