pub fn cospi<S: ScalarAd>(x: S) -> S
Primal cospi.
cospi
use chainrules::cospi; assert!((cospi(0.25_f64) - (std::f64::consts::PI * 0.25_f64).cos()).abs() < 1e-12);