Skip to main content

Module sin

Module sin 

Source
Expand description

Implementations of Sin and SinAssign, traits for computing the sine of Floats.

Functionsยง

primitive_float_sin
Computes $\sin x$, the sine of a primitive float. Using this function is more accurate than using the default sin function or the one provided by libm.
primitive_float_sin_pi
Computes $\sin(\pi x)$, the sine of a primitive float measured in half-turns.
primitive_float_sin_pi_rational
Computes $\sin(\pi x)$, the sine of a Rational measured in half-turns, returning the result as a primitive float.
primitive_float_sin_rational
Computes $\sin x$, the sine of a Rational, returning the result as a primitive float.
primitive_float_sin_with_period
Computes $\sin(2\pi x/u)$, the sine of a primitive float measured in $u$ths of a turn (so that u = 360 is degrees).
primitive_float_sin_with_period_rational
Computes $\sin(2\pi x/u)$, the sine of a Rational measured in $u$ths of a turn (so that u = 360 is degrees), returning the result as a primitive float.