cot_rrule

Function cot_rrule 

Source
pub fn cot_rrule<S: ScalarAd>(x: S, cotangent: S) -> S
Expand description

Reverse rule for cot.

ยงExamples

use chainrules::cot_rrule;
let dy = cot_rrule(0.5_f64, 1.0);
assert!((dy + 1.0 / 0.5_f64.sin().powi(2)).abs() < 1e-12);