tand_frule

Function tand_frule 

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

Forward rule for tand.

ยงExamples

use chainrules::tand_frule;

let (_, dy) = tand_frule(45.0_f64, 1.0);
assert!((dy - 2.0 * std::f64::consts::PI / 180.0).abs() < 1e-12);