inv_rrule

Function inv_rrule 

Source
pub fn inv_rrule<S: ScalarAd>(result: S, cotangent: S) -> S
Expand description

Reverse rule for inv.

ยงExamples

use chainrules::inv_rrule;

let dx = inv_rrule(0.25_f64, 2.0);
assert!((dx + 0.125).abs() < 1e-12);