Skip to main content

Module sec

Module sec 

Source
Expand description

Implementations of Sec and SecAssign, traits for computing the secant of Floats.

Functionsยง

primitive_float_sec
Computes $\sec x$, the secant of a primitive float, correctly rounded. Neither the standard library nor libm provides a secant.
primitive_float_sec_pi
Computes $\sec(\pi x)$, the secant of a primitive float measured in half-turns.
primitive_float_sec_pi_rational
Computes $\sec(\pi x)$, the secant of a Rational measured in half-turns, returning the result as a primitive float.
primitive_float_sec_rational
Computes $\sec x$, the secant of a Rational, returning the result as a primitive float.
primitive_float_sec_with_period
Computes $\sec(2\pi x/u)$, the secant of a primitive float measured in $u$ths of a turn (so that u = 360 is degrees).
primitive_float_sec_with_period_rational
Computes $\sec(2\pi x/u)$, the secant of a Rational measured in $u$ths of a turn (so that u = 360 is degrees), returning the result as a primitive float.