Function coth

Source
pub fn coth(x: f64) -> f64
Expand description

§coth(x)

Hyperbolic Function

The coth function computes the hyperbolic cotangent of a number (in radians).

§Equation

coth(x) = (exp(x) + exp(-x)) / (exp(x) - exp(-x))

§Examples

use mathlab::math::{coth, INF_F64 as inf};
assert_eq!(coth(0.0), inf);
assert_eq!(coth(0.523598775598299), 2.081283363933637);
assert_eq!(coth(3.141592653589793), 1.003741873197321);
assert_eq!(coth(6.283185307179586), 1.000006974709036);

End Fun Doc