pub fn hypot_frule<R: Float>(x: R, y: R, dx: R, dy: R) -> (R, R)Expand description
Forward rule for hypot.
ยงExamples
use chainrules::hypot_frule;
let (r, dr) = hypot_frule(3.0_f64, 4.0_f64, 0.5_f64, 0.25_f64);
assert_eq!(r, 5.0);
assert!((dr - 0.5).abs() < 1e-12);