tanh

expect fun tanh(x: Double): Double(source)
expect fun tanh(x: Float): Float(source)

Computes the hyperbolic tangent of the value x.

Special cases:

  • tanh(NaN) is NaN

  • tanh(+Inf) is 1.0

  • tanh(-Inf) is -1.0

Since Kotlin

1.2
actual inline fun tanh(x: Double): Double(source)
actual inline fun tanh(x: Float): Float(source)

Computes the hyperbolic tangent of the value x.

Special cases:

  • tanh(NaN) is NaN

  • tanh(+Inf) is 1.0

  • tanh(-Inf) is -1.0

Since Kotlin

1.2
actual inline fun tanh(x: Double): Double(source)
actual inline fun tanh(x: Float): Float(source)

Computes the hyperbolic tangent of the value x.

Special cases:

  • tanh(NaN) is NaN

  • tanh(+Inf) is 1.0

  • tanh(-Inf) is -1.0

Since Kotlin

1.2
actual external fun tanh(x: Double): Double(source)
actual external fun tanh(x: Float): Float(source)

Computes the hyperbolic tangent of the value x.

Special cases:

  • tanh(NaN) is NaN

  • tanh(+Inf) is 1.0

  • tanh(-Inf) is -1.0

Since Kotlin

1.3
actual fun tanh(x: Double): Double(source)
actual fun tanh(x: Float): Float(source)

Computes the hyperbolic tangent of the value x.

Special cases:

  • tanh(NaN) is NaN

  • tanh(+Inf) is 1.0

  • tanh(-Inf) is -1.0

Since Kotlin

1.8
actual fun tanh(x: Double): Double(source)
actual fun tanh(x: Float): Float(source)

Computes the hyperbolic tangent of the value x.

Special cases:

  • tanh(NaN) is NaN

  • tanh(+Inf) is 1.0

  • tanh(-Inf) is -1.0

Since Kotlin

1.8