Digits, Digits, and Digits
summary
BigDecimal's BigMath gains practical huge‑digit functions: exp and trig move from minutes or years to seconds by improving multiplication and using binary splitting/bit‑burst and balanced pairing. Empirical results: 10,000 digits of sin drops from 2s to 0.005s, 100,000 digits from 45min to 70s then to 0.5s, and 1 billion digits in ~150–180s. Implementation mixes C-optimized big‑integer multiplication, Ruby-level binary splitting, and pragmatic splitting heuristics; tests and edge‑case digit buffering validate correctness.
AI-written summary · about
chapters (10)
- 0:00Introduction and motivation
- 3:43BigDecimal overview
- 6:30Exponential function basics
- 15:07Multiplication speedup techniques
- 18:23Binary Splitting Method
- 24:45Bit Burst algorithm discovery
- 25:35Implementing other math functions
- 27:51Testing and edge cases
- 28:59Open problems and future work
- 29:40Conclusion and magic of numbers








