Table of Contents
Fetching ...

Faithful Polynomial Evaluation with Compensated Horner Algorithm

Philippe Langlois, Nicolas Louvet

TL;DR

This work tackles faithful rounding for polynomial evaluation in IEEE-754 arithmetic, where the classic Horner scheme can suffer from cancellations. It proposes compensated Horner, leveraging error-free transformations to separate and compensate rounding errors, and establishes both a priori and dynamic conditions under which the evaluated polynomial is faithfully rounded. The a priori condition bounds the polynomial's condition number $\text{cond}(p,x)$ to guarantee faithfulness, while the dynamic bound permits runtime validation of faithfulness; experiments show the dynamic bound provides tighter guarantees with modest overhead. Overall, compensated Horner delivers accuracy comparable to computing with twice the working precision and rounding, offering a practical approach to faithful evaluation for numerical predicates and high-reliability computations.

Abstract

This paper presents two sufficient conditions to ensure a faithful evaluation of polynomial in IEEE-754 floating point arithmetic. Faithfulness means that the computed value is one of the two floating point neighbours of the exact result; it can be satisfied using a more accurate algorithm than the classic Horner scheme. One condition here provided is an apriori bound of the polynomial condition number derived from the error analysis of the compensated Horner algorithm. The second condition is both dynamic and validated to check at the running time the faithfulness of a given evaluation. Numerical experiments illustrate the behavior of these two conditions and that associated running time over-cost is really interesting.

Faithful Polynomial Evaluation with Compensated Horner Algorithm

TL;DR

This work tackles faithful rounding for polynomial evaluation in IEEE-754 arithmetic, where the classic Horner scheme can suffer from cancellations. It proposes compensated Horner, leveraging error-free transformations to separate and compensate rounding errors, and establishes both a priori and dynamic conditions under which the evaluated polynomial is faithfully rounded. The a priori condition bounds the polynomial's condition number to guarantee faithfulness, while the dynamic bound permits runtime validation of faithfulness; experiments show the dynamic bound provides tighter guarantees with modest overhead. Overall, compensated Horner delivers accuracy comparable to computing with twice the working precision and rounding, offering a practical approach to faithful evaluation for numerical predicates and high-reliability computations.

Abstract

This paper presents two sufficient conditions to ensure a faithful evaluation of polynomial in IEEE-754 floating point arithmetic. Faithfulness means that the computed value is one of the two floating point neighbours of the exact result; it can be satisfied using a more accurate algorithm than the classic Horner scheme. One condition here provided is an apriori bound of the polynomial condition number derived from the error analysis of the compensated Horner algorithm. The second condition is both dynamic and validated to check at the running time the faithfulness of a given evaluation. Numerical experiments illustrate the behavior of these two conditions and that associated running time over-cost is really interesting.

Paper Structure

This paper contains 19 sections, 9 theorems, 42 equations, 3 figures, 2 tables, 9 algorithms.

Key Result

Lemma 1

Let $p$ and $q$ be two polynomials with floating point coefficients, such that $p(x) = \sum_{i=0}^n a_i x^i$ and $q(x) = \sum_{i=0}^n b_i x^i$. We consider the floating point evaluation of $(p+q)(x)$ computed with $\hbox{\sf Horner}\left(p \oplus q, x\right)$. Then, in case no underflow occurs, the Moreover, if we assume that $x$ and the coefficients of $p$ and $q$ are non-negative floating point

Figures (3)

  • Figure 1: We report the evaluation of polynomials $p_n$ near the multiple root $x=1$ with the compensated Horner algorithm ( CompHornerIsFaithul) and for multiplicity $n=6, 8, 10, 12$. Each evaluation proved to be faithfully rounded thanks to the dynamic test is reported with a green cross. The faithful evaluations that are not detected to be so with the dynamic test are represented in blue. Finally, the evaluations that are not faithfully rounded are reported in red. The lower frame represents the condition number with respect to the argument $x$.
  • Figure 2: We report the relative accuracy of every polynomial evaluation ($y$ axis) with respect to the condition number ($x$ axis). Evaluation is performed with CompHornerIsFaithul (Algorithm \ref{['algo:FaithfulRoundingCompHorner']}). The color code is the same as for Figure \ref{['fig:CHFaithBinom']}. Leftmost vertical line is the a priori sufficient condition (\ref{['rel:APrioriCriterion']}) while the right one marks the inverse of the working precision ${\mathbf{u}}$. Broken line is the a priori accuracy bound (\ref{['rel:REBCompHorner']}).
  • Figure 3: The dynamic error bound (\ref{['rel:DynErrorBound']}) compared to the a priori bound (\ref{['rel:EBCompHorner']}) and to the actual forward error ($p(x)=(1-x)^5$ for $400$ entries on the $x$ axis).

Theorems & Definitions (19)

  • Lemma 1
  • proof
  • Theorem 2: OgRO:05
  • Theorem 3: grll05
  • proof : Proof of Theorem \ref{['theorem:EFTHorner']}
  • Theorem 4: grll05
  • proof
  • Remark 1
  • Lemma 5: RuOO06
  • Lemma 6
  • ...and 9 more