Function Tanh(x)

Tanh

Tanh(
    x             ! (input) numerical expression
    )

Arguments

x

A scalar numerical expression.

Return Value

The Tanh function returns the hyperbolic tangent of x in the range \(-1\) to \(1\).

Graph

../../_images/tanh.png

Example

_p_returnA := TanH( 0    ); ! TanH( 0   ) = 0
_p_returnB := TanH( 1    ); ! TanH( 1   ) = 0.761594155956
_p_returnC := TanH( p_pi ); ! TanH( pi  ) = 0.996272076221
_p_returnD := TanH( 1e9  ); ! TanH( 1e3 ) = 1

Note

The function Tanh can be used in constraints of nonlinear mathematical programs.

See also