Skip to content

TANH function

Overview

TANH is a function of the Math and Trigonometry category that calculates the hyperbolic tangent of a number.

Usage

Syntax

TANH(number) => tanh

Argument descriptions

  • number (number, required). The hyperbolic angle whose hyperbolic tangent is to be calculated, expressed in radians.

Additional guidance

The formula for the hyperbolic tangent is:

tanh(x)=sinh(x)cosh(x)=exexex+ex

Returned value

TANH returns a real number in the range (-1,+1) that is the hyperbolic tangent of the specified hyperbolic angle.

Error conditions

  • In common with many other IronCalc functions, TANH propagates errors that are found in its argument.
  • If no argument, or more than one argument, is supplied, then TANH returns the #ERROR! error.
  • If the value of the number argument is not (or cannot be converted to) a number, then TANH returns the #VALUE! error.
  • For some argument values, TANH may return a #DIV/0! error.
  • For more information about the different types of errors that you may encounter when using IronCalc functions, visit our Error Types page.

Details

  • The TANH function utilizes the tanh() method provided by the Rust Standard Library.
  • The figure below illustrates the TANH function.

Examples

See some examples in IronCalc.