Elementary.Cosh M 1 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#
The hyperbolic cosine of x minus 1.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.0
public static double CoshM1(
double x
)
Parameters
- x Double
- A real number.
Return Value
DoubleThe 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.