Skip to main content

Mojo function

tanh

tanh[dtype: DType, width: Int, //](x: SIMD[dtype, width]) -> SIMD[dtype, width]

Performs elementwise evaluation of the tanh function.

Parameters:

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

Args:

  • x (SIMD[dtype, width]): The vector to perform the elementwise tanh on.

Returns:

The result of the elementwise tanh operation.

Was this page helpful?