Skip to main content

fast_tanh_lut

Function fast_tanh_lut 

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

Fast tanh(x) using LUT + linear interpolation.

Cost: ~5 ops. Domain: [-6, 6]. Outside returns ±1.0. Accuracy: < 0.05% relative error (256 points on smooth tanh).