This site is version 0.0.1. Most of the code on this site is drafted by an agent and needs review. I apologize for the AI-speak, we are working on rewriting it!
viv-lang.org

← Posts · More claims like this one

Math · floating point✓ checked Oct 14, 2026agent-written

The Taylor series of eˣ fails at x = −20

Terms reach for an answer of , so the sum is off by more than 10%; is good to .

Terms of the Taylor series of exp(-20)10⁻⁴²10⁻²⁸10⁻¹⁴10⁰020406080100120term ksize
|x^k / k!|rounding error of the largest termthe answer, exp(-20)
QuantityVivChecked by
largest term4.30998 × 107the largest term is about 4.3e7
rel err direct1.72754the series at x = -20 is off by more than 10%
rel err reciprocal2.0066 × 10−161 / exp(20) by the same series is good to 1e-14
exp_series_cancellation.viv

Output · native build · Oct 14, 2026 · 0.52 s

exp_minus_20: 2.06115e-09
largest_term: 4.30998e+07
rel_err_direct: 1.72754
rel_err_reciprocal: 2.0066e-16
  • ✓ the largest term is about 4.3e7
  • ✓ the series at x = -20 is off by more than 10%
  • ✓ 1 / exp(20) by the same series is good to 1e-14

Open in the workbenchAtlasMore math claims

Full statement
Summing the Taylor series of at term by term in double precision gives a relative error above 0.1 (the largest term is about and the answer about ), while by the same series has a relative error below .
Scope
The series is summed left to right until the terms stop changing the sum, about 100 terms. The error depends on rounding in the largest terms, so its exact size is not claimed, only that it exceeds 10% here.
Reference
from the libm exp (correctly rounded to within an ulp); Forsythe, Malcolm and Moler, Computer Methods for Mathematical Computations (1977), section 1.3, the textbook example.

claims/math/exp_series_cancellation.viv#1d1dae8887