cospi

Function cospi 

Source
pub fn cospi<S: ScalarAd>(x: S) -> S
Expand description

Primal cospi.

ยงExamples

use chainrules::cospi;

assert!((cospi(0.25_f64) - (std::f64::consts::PI * 0.25_f64).cos()).abs() < 1e-12);