Formualizer Docs

TANH

Returns the hyperbolic tangent of a number.

TANH computes SINH(x) / COSH(x).

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

=TANH(number)

Arguments

ArgumentTypeRequiredDefault
numbernumberRequired—

How it works

Hyperbolic tangent is sinh(x) / cosh(x). Since cosh(x) is positive for real x, the ratio is defined everywhere on the real line and stays between −1 and 1.

Remarks

  • Domain: accepts any real number.
  • Radians: this function is hyperbolic, so the input is not treated as an angle in radians.

Error cases

  • Errors: no function-specific domain errors are produced.

Examples

Divide sinh(0.5) by cosh(0.5).

Formula =TANH(0.5)

Expected result 0.46211715726001

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

The numerator changes sign and the denominator stays positive.

Formula =TANH(-0.5)

Expected result -0.46211715726001

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

At zero the hyperbolic tangent vanishes.

Formula =TANH(0)

Expected result 0

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

The text “invalid” cannot be used as the input to the hyperbolic tangent.

Formula =TANH("invalid")

Expected result #VALUE!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Hyperbolic tangent at two

Formula =TANH(2)

Expected result 0.964027580075817

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

What output range should TANH produce?

For real inputs, TANH stays strictly between -1 and 1.

Implementation

Engine source

On this page