tanh

Summary

Get the hyperbolic tangent of a number.

Usage

public static double tanh(double x)

Returns

The hyperbolic tangent of the number.

Parameters

x

The number to get the hyperbolic tangent of.

Description

Returns the hyperbolic tangent for a number.

The hyperbolic tangent for a number can be expressed as:

Math.tanh(x) == Math.sinh(x) / Math.cosh(x);

Examples

Basic Usage
1
2
3
4
import System;
 
Console.log(Math.tanh(0)); // 0
Console.log(Math.tanh(1)); // 0.7615941559557649

Share

HTML | BBCode | Direct Link