pub fn powi_rrule<S: ScalarAd>(x: S, exponent: i32, cotangent: S) -> S
Reverse rule for powi with fixed integer exponent.
powi
use chainrules::powi_rrule; let dx = powi_rrule(2.0_f64, 4, 1.0); assert_eq!(dx, 32.0);