Skip to main content

Module cot

Module cot 

Source
Expand description

Implementations of Cot and CotAssign, traits for computing the cotangent of Floats.

Functionsยง

primitive_float_cot
Computes $\cot x$, the cotangent of a primitive float, correctly rounded. Neither the standard library nor libm provides a cotangent.
primitive_float_cot_pi
Computes $\cot(\pi x)$, the cotangent of a primitive float measured in half-turns.
primitive_float_cot_pi_rational
Computes $\cot(\pi x)$, the cotangent of a Rational measured in half-turns, returning the result as a primitive float.
primitive_float_cot_rational
Computes $\cot x$, the cotangent of a Rational, returning the result as a primitive float.
primitive_float_cot_with_period
Computes $\cot(2\pi x/u)$, the cotangent of a primitive float measured in $u$ths of a turn (so that u = 360 is degrees).
primitive_float_cot_with_period_rational
Computes $\cot(2\pi x/u)$, the cotangent of a Rational measured in $u$ths of a turn (so that u = 360 is degrees), returning the result as a primitive float.