inv_frule

Function inv_frule 

Source
pub fn inv_frule<S: ScalarAd>(x: S, dx: S) -> (S, S)
Expand description

Forward rule for inv.

ยงExamples

use chainrules::inv_frule;

let (y, dy) = inv_frule(4.0_f64, 2.0);
assert_eq!(y, 0.25);
assert!((dy + 0.125).abs() < 1e-12);