Enhancing the implementation of mathematical formulas for fixed-point and floating-point arithmetics

  • Authors:
  • Matthieu Martel

  • Affiliations:
  • Laboratoire ELIAUS-DALI, Université de Perpignan Via Domitia, Perpignan Cedex, France 66860

  • Venue:
  • Formal Methods in System Design
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

This article introduces some techniques to estimate and to improve the numerical quality of computations performed using different computer arithmetics. A general methodology is introduced and it is applied to the fixed-point and floating-point formats. We show how to globally measure the quality of the implementation of a formula with respect to some quality indicators. In the case of the floating-point arithmetic, the indicator measures the distance between the computer and exact results in the worst case. In the case of the fixed-point arithmetic, the indicator bounds the number of digits needed to represent all the intermediary results. Next, we show how the operations which make mostly decrease the quality of an indicator can be identified. This information helps the programmer to improve the implementation by underlying the main sources of degradation. Finally, we introduce a fully automatic expression transformation technique to rewrite a formula into a better, mathematically equivalent one. The new formula is more accurate than the original one with respect to the chosen quality indicator.