次の方法で共有


StrictMath.Tanh(Double) Method

Definition

Returns the hyperbolic tangent of a double value.

[Android.Runtime.Register("tanh", "(D)D", "")]
public static double Tanh (double x);
[<Android.Runtime.Register("tanh", "(D)D", "")>]
static member Tanh : double -> double

Parameters

x
Double

The number whose hyperbolic tangent is to be returned.

Returns

The hyperbolic tangent of x.

Attributes

Remarks

Returns the hyperbolic tangent of a double value. The hyperbolic tangent of x is defined to be (e<sup>x</sup>&nbsp;-&nbsp;e<sup>-x</sup>)/(e<sup>x</sup>&nbsp;+&nbsp;e<sup>-x</sup>), in other words, Math#sinh sinh(<i>x</i>)/Math#cosh cosh(<i>x</i>). Note that the absolute value of the exact tanh is always less than 1.

Special cases: <ul>

<li>If the argument is NaN, then the result is NaN.

<li>If the argument is zero, then the result is a zero with the same sign as the argument.

<li>If the argument is positive infinity, then the result is +1.0.

<li>If the argument is negative infinity, then the result is -1.0.

</ul>

Added in 1.5.

Java documentation for java.lang.StrictMath.tanh(double).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to