Function HyperTang(float)

Function Documentation

float HyperTang(float x)

Computes the hyperbolic tangent activation function.

The hyperbolic tangent function is defined as \( \tanh(x) = \frac{e^x - e^{-x}}{e^x + e^{-x}} \).

Parameters:

x – The input value.

Returns:

The hyperbolic tangent of the input value.