Toward accurate polynomial evaluation in rounded arithmetic (short report)

James Demmel, Ioana Dumitriu, Olga Holtz

TL;DR

This paper tackles the fundamental question of whether a given polynomial can be evaluated accurately using standard floating-point arithmetic. The authors develop a theoretical framework to determine this, showing that for some polynomials, accurate evaluation is impossible without more advanced techniques or a different arithmetic model. They lay the groundwork for a "compiler" that could automatically generate accurate polynomial evaluation algorithms or prove their impossibility.

What Problem Does This Paper Address?

Computers use floating-point arithmetic, which introduces small rounding errors with every operation. While this is usually acceptable, for certain mathematical problems, these errors can accumulate and lead to wildly inaccurate results. This is particularly true for polynomial evaluation. The paper addresses the challenge of determining when a polynomial can be evaluated accurately (meaning with a small relative error) using standard arithmetic operations (+, -, *). The authors aim to create a formal decision procedure that can tell us if an accurate algorithm exists for a given polynomial and domain, and if so, how to construct it. They highlight that unlike exact arithmetic where any polynomial can be computed, rounded arithmetic imposes fundamental limitations.

Methods

The core of the paper is developing a theoretical framework for "accurate evaluability." They define an algorithm as accurate if its output is within a specified relative error ($\eta$) of the true value, regardless of the rounding errors (bounded by machine epsilon $\epsilon$).

Key methodological contributions include:

  • Formalizing the "accurate algorithm" definition: This involves precise mathematical conditions on the output error.
  • Introducing the concept of "allowable varieties": The variety of a polynomial $V(p) = \{x : p(x) = 0\}$ is crucial. They define specific types of hyperplanes (e.g., $x_i = 0$, $x_i + x_j = 0$, $x_i - x_j = 0$) and call a variety "allowable" if it can be represented as a union of intersections of these. This geometric property is linked to accurate evaluability.
  • Developing "necessity" and "sufficiency" conditions:
    • Necessity: They derive conditions that must hold for a polynomial to be accurately evaluable. A key result (Theorem 4.4) states that if a point in the polynomial's variety (in "general position") allows for a non-zero intersection with the interior of the domain, then accurate evaluation is impossible.
  • Sufficiency: For the complex case, they show that an allowable variety is sufficient for accurate evaluability.
  • "Dominance" and "Pruning": For real polynomials, they introduce the concept of "dominant terms" – terms that become most significant near certain components of the variety. They propose a "pruning" process to extract these dominant terms and show that accurate evaluation of these dominant terms is necessary for the overall polynomial.
  • Considering different arithmetic models: They analyze "classical arithmetic" (+, -, *) and "black-box arithmetic" (where arbitrary polynomial operations are allowed as primitives).

Datasets

Not discussed in the paper. The paper is theoretical and focuses on the properties of polynomials and arithmetic models, rather than empirical evaluation on specific datasets.

Key Insights and Ideas

  • Geometric properties dictate numerical accuracy: The shape and structure of a polynomial's zero set (its variety) fundamentally determine whether it can be evaluated accurately in finite-precision arithmetic. This is a powerful link between algebra and numerical analysis.
  • Not all polynomials are created equal: Unlike exact arithmetic, where any polynomial can be computed, rounded arithmetic imposes inherent limitations. Some polynomials are simply impossible to evaluate accurately with standard operations, regardless of the algorithm.
  • The importance of "allowable" varieties: The specific structure of the variety, decomposable into simple linear constraints, is a key indicator of accurate evaluability, especially in the complex domain.
  • Dominant terms are key for real polynomials: For real polynomials, understanding and accurately evaluating their "dominant terms" near their roots is crucial for overall accurate evaluation. This suggests a recursive approach to algorithm design.
  • Branching matters: The ability to use conditional branching in algorithms can make a difference in whether a polynomial can be evaluated accurately, particularly in the real case.

Key Results

  • Complex Case: For polynomials over $\mathbb{C}^n$, accurate evaluability is necessary and sufficient if and only if the polynomial's variety is "allowable" (defined by specific linear constraints). This provides a complete decision procedure for this case.
  • Real Case:
    • Necessity: They provide conditions (Theorem 4.4) based on the variety and domain that, if violated, prove a polynomial cannot be evaluated accurately.
  • Sufficiency: They show that accurate evaluation of "dominant terms" (identified through geometric analysis of the variety and Newton polytopes) is sufficient for accurate evaluation of the polynomial, provided branching is allowed.
  • Progress towards a decision procedure: The paper presents significant steps towards a general decision procedure for accurate polynomial evaluation, particularly for homogeneous polynomials.

Limitations and Future Work

  • Full Decision Procedure: The authors acknowledge that a complete decision procedure for all cases (especially real polynomials with arbitrary domains and black-box arithmetic) is still a work in progress.
  • Inductive Step Challenges: They note that the "dominant term" approach doesn't always simplify the problem, as dominant terms can sometimes be as complex as the original polynomial, hindering a straightforward inductive proof for a general decision procedure.
  • Incorporating Division and Rational Functions: The current analysis focuses on polynomials. Extending it to division and rational functions is a significant open problem.
  • General Semialgebraic Domains: The analysis is mostly for open domains like $\mathbb{R}^n$ or $\mathbb{C}^n$. Extending to more general semialgebraic domains is a natural next step.
  • Practical Implementation: The authors express a desire to implement their decision procedure as a "compiler" that could either generate accurate algorithms or prove their impossibility.
  • Relationship to Interval Arithmetic and Bit-Complexity: Further understanding the connection between accurate evaluability, interval arithmetic, and the bit-complexity of computations is suggested.

Summary updated

Abstract

Given a multivariate real (or complex) polynomial $p$ and a domain $cal D$, we would like to decide whether an algorithm exists to evaluate $p(x)$ accurately for all $x in {cal D}$ using rounded real (or complex) arithmetic. Here ``accurately'' means with relative error less than 1, i.e., with some correct leading digits. The answer depends on the model of rounded arithmetic: We assume that for any arithmetic operator $op(a,b)$, for example $a+b$ or $a cdot b$, its computed value is $op(a,b) cdot (1 + delta)$, where $| delta |$ is bounded by some constant $epsilon$ where $0 < epsilon ll 1$, but $delta$ is otherwise arbitrary. This model is the traditional one used to analyze the accuracy of floating point algorithms. Our ultimate goal is to establish a decision procedure that, for any $p$ and $cal D$, either exhibits an accurate algorithm or proves that none exists. In contrast to the case where numbers are stored and manipulated as finite bit strings (e.g., as floating point numbers or rational numbers) we show that some polynomials $p$ are impossible to evaluate accurately. The existence of an accurate algorithm will depend not just on $p$ and $cal D$, but on which arithmetic operators and constants are available to the algorithm and whether branching is permitted in the algorithm. Toward this goal, we present necessary conditions on $p$ for it to be accurately evaluable on open real or complex domains ${cal D}$. We also give sufficient conditions, and describe progress toward a complete decision procedure. We do present a complete decision procedure for homogeneous polynomials $p$ with integer coefficients, ${cal D} = C^n$, using only arithmetic operations $+$, $-$ and $cdot$.
BibTeX
@inproceedings{demmel2005toward,
  author = {James Demmel and Ioana Dumitriu and Olga Holtz},
  title = {{Toward accurate polynomial evaluation in rounded arithmetic (short report)}},
  booktitle = {Algebraic and Numerical Algorithms and Computer-assisted Proofs},
  year = {2005},
  url = {https://openreview.net/forum?id=M3ZEFBdTD2},
}
Figure