Math module

cot

procedure · 1 overloadSource

The cotangent cos(x) / sin(x) for float64. At a multiple of pi the sine is (nearly) zero, so the result is huge or infinite.

ExampleOpen in playground ↗
assert(abs(cot(PI64 / 4) - 1) < 0.000001);
cot :: (x: float64) -> float64

Cotangent, cos(x) / sin(x).

Parameters

x: float64
the angle in radians.

Returns

float64

See also