tanh()

Calculates the hyperbolic tangent.

Synopsis

float tanh(float x);

Parameters

Parameter Description
x Angle

Return value

The functions returns 0.0 if an error occurs.

Errors

missing or incorrect arguments

Description

Returns the hyperbolic tangent of the angle x.

Example

main()
{
  float pi=3.1415926, f;
  f=tan(pi/4); // Results in 1
  f=rad2deg(atan(1)); // Results in 45
  f=tanh(90); // Results in 1
  f=atan("Fault"); // Results in 0
}

Assignment

Mathematical function

Availability

CTRL