Skip to main content

fast_exp_lut

Function fast_exp_lut 

pub fn fast_exp_lut(x: f64) -> f64
Expand description

Fast exp(x) using LUT + linear interpolation.

Cost: ~5 ops (1 multiply for index, 1 floor, 1 lerp, 2 table lookups). Domain: [-40, 40]. Outside this range, returns 0 (underflow) or Wave::MAX (overflow).

Accuracy: < 0.1% relative error across the domain (linear interpolation between 512 uniformly-spaced points on a smooth exponential).