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): The vector to perform the elementwise tanh on.

Returns:

SIMD: The result of the elementwise tanh operation.

Was this page helpful?