pub fn sincospi_rrule<S: ScalarAd>(x: S, cotangents: (S, S)) -> SExpand description
Reverse rule for sincospi.
ยงExamples
use chainrules::sincospi_rrule;
let dx = sincospi_rrule(0.25_f64, (1.0, 1.0));
assert!(
(dx - (std::f64::consts::PI * (std::f64::consts::PI * 0.25_f64).cos()
- std::f64::consts::PI * (std::f64::consts::PI * 0.25_f64).sin()))
.abs()
< 1e-12
);