pub fn cot<S: ScalarAd>(x: S) -> S
Primal cot.
cot
use chainrules::cot; assert!((cot(0.5_f64) - 1.0 / 0.5_f64.tan()).abs() < 1e-12);