pub fn exp2<S: ScalarAd>(x: S) -> S
Primal 2^x.
2^x
use chainrules::exp2; assert!((exp2(3.0_f64) - 8.0).abs() < 1e-12);