PadeExp — Padé Approximant for exp(x) with Interval Bounds #
[4/4] Padé approximant for exp(x) on [-1, 1], with argument reduction
for arbitrary x ∈ ℝ. The approximant has relative error < 10⁻⁷ on [-1,1],
so the error bound 1/4000000 provides a 2.3× safety margin.
Strategy #
For small |x| ≤ 1: exp(x) ≈ padeNum(x) / padeDen(x) (within padeErrorBound)
For large |x|:
- Choose k so x/2^k ∈ [-1, 1]
- Compute exp(x/2^k) via Padé
- Square k times: exp(x) = exp(x/2^k)^(2^k)
Padé [4/4] denominator: padeNum(-x).
Equations
Instances For
Padé [4/4] approximant: padeNum(x) / padeDen(x).
Equations
Instances For
Conservative error bound for Padé [4/4] on [-1, 1]. True error is ~4.3×10⁻⁸; this bound gives 2.3× safety margin.
Equations
- Linglib.Interval.padeErrorBound = 1 / 4000000
Instances For
The Padé [4/4] approximant is within padeErrorBound of exp on [-1, 1].
Proof via triangle inequality: |exp(q) - P(q)/Q(q)| ≤ |exp(q) - T₁₀(q)| + |T₁₀(q) - P(q)/Q(q)|
where T₁₀ is the degree-10 Taylor polynomial. The first term is bounded by Real.exp_bound
with n = 11 (≤ 1/36590400 ≈ 2.73×10⁻⁸). The second term equals |T₁₀·Q - P|/Q; the numerator
is a polynomial with terms only at degrees 9-14 (Padé matching property), bounded by
187/2032128000 ≈ 9.2×10⁻⁸ via coefficient sum, and Q ≥ 143/240.
Repeated squaring of a nonneg interval. Squares I a total of n times: repeatedSq I 0 = I, repeatedSq I (n+1) = (repeatedSq I n)².
Equations
- Linglib.Interval.repeatedSq I n h = ↑(Linglib.Interval.repeatedSqCore✝ I n h)
Instances For
Point interval containing exp(q) for arbitrary rational q.
Strategy: reduce q → q' = q/2^k with |q'| ≤ 1 via reductionSteps,
compute exp(q') via Padé [4/4], then square k times since exp(q) = exp(q')^(2^k).
The nonneg guard on small.lo is always true by construction:
padeExp(q') ≈ exp(q') ≥ exp(-1) ≈ 0.368 >> padeErrorBound = 2.5×10⁻⁷.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Containment theorem for expPoint.
Interval containing exp(x) for x in rational interval I.
Uses monotonicity of exp: for x ∈ [lo, hi], exp(lo) ≤ exp(x) ≤ exp(hi) so exp(x) ∈ [expPoint(lo).lo, expPoint(hi).hi].
Equations
- Linglib.Interval.expInterval I = { lo := (Linglib.Interval.expPoint I.lo).lo, hi := (Linglib.Interval.expPoint I.hi).hi, valid := ⋯ }
Instances For
Containment theorem for expInterval: monotonicity of exp + expPoint containment.