Elementary.CosM1 Method

Returns the cosine of an angle, minus 1, accurately for angles close to a multiple of π.

Definition

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

Parameters

x  Double
A real number.

Return Value

Double
The exponential function minus 1.

Remarks

When x is close to zero, the cosine is close to one. Subtracting one from this result can cause significant round-off error. This function resolves this problem by using an expression in terms of different functions for such arguments.

See Also