Skip to main content

exp_slice_dispatch

Function exp_slice_dispatch 

Source
pub fn exp_slice_dispatch(input: &[f32], output: &mut [f32])
Expand description

Fast exp approximation applied element-wise: output[i] = exp(input[i]).

Uses a polynomial approximation (degree-4 minimax on [-88, 88]) that is accurate to roughly 1e-4 relative error for the typical NN activation range.