Elementary.CoshM1 Method

Returns the hyperbolic cosine of a real number minus one.

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.0
C#
public static double CoshM1(
	double x
)

Parameters

x  Double
A real number.

Return Value

Double
The hyperbolic cosine of x minus 1.

Remarks

For values close to 0, the hyperbolic cosine is very close to 1. As a result, the simply subtracting 1 leads to catastrophic cancellation. This method uses an alternative formula that gives accurate results for arbitrary values of x.

See Also