coth_frule

Function coth_frule 

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

Forward rule for coth.

ยงExamples

use chainrules::coth_frule;

let (_, dy) = coth_frule(0.5_f64, 1.0);
assert!((dy + 1.0 / 0.5_f64.sinh().powi(2)).abs() < 1e-12);