lut
Lookup Tables
Precomputed lookup tables for fast mathematical operations. These functions use binary search through hardcoded values to avoid expensive runtime calculations.
Functions
msb- Most significant bit position and power of 2exp2- Powers of 2 for exponents 0-64sin- Sine interpolation data for 256 slotsatan- Arctangent interpolation data for 100 slots
Implementation Notes
These lookup tables are optimized for gas efficiency by using cascading if-statements with binary search patterns. While the code is verbose, it provides O(log n) lookup time.
Fully qualified path: cairo_fp::f128::math::lut