Computer Arithmetic and Formal Proofs
eBook - ePub

Computer Arithmetic and Formal Proofs

Verifying Floating-point Algorithms with the Coq System

  1. 326 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Computer Arithmetic and Formal Proofs

Verifying Floating-point Algorithms with the Coq System

Book details
Book preview
Table of contents
Citations

About This Book

Floating-point arithmetic is ubiquitous in modern computing, as it is the tool of choice to approximate real numbers. Due to its limited range and precision, its use can become quite involved and potentially lead to numerous failures. One way to greatly increase confidence in floating-point software is by computer-assisted verification of its correctness proofs.

This book provides a comprehensive view of how to formally specify and verify tricky floating-point algorithms with the Coq proof assistant. It describes the Flocq formalization of floating-point arithmetic and some methods to automate theorem proofs. It then presents the specification and verification of various algorithms, from error-free transformations to a numerical scheme for a partial differential equation. The examples cover not only mathematical algorithms but also C programs as well as issues related to compilation.

  • Describes the notions of specification and weakest precondition computation and their practical use
  • Shows how to tackle algorithms that extend beyond the realm of simple floating-point arithmetic
  • Includes real analysis and a case study about numerical analysis

Frequently asked questions

Simply head over to the account section in settings and click on ā€œCancel Subscriptionā€ - itā€™s as simple as that. After you cancel, your membership will stay active for the remainder of the time youā€™ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlegoā€™s features. The only differences are the price and subscription period: With the annual plan youā€™ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, weā€™ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access Computer Arithmetic and Formal Proofs by Sylvie Boldo,Guillaume Melquiond in PDF and/or ePUB format, as well as other popular books in Computer Science & Computer Science General. We have over one million books available in our catalogue for you to explore.

Information

1

Floating-Point Arithmetic

Abstract

Roughly speaking, floating-point (FP) arithmetic is the way numerical quantities are handled by the computer. Many different programs rely on FP computations such as control software, weather forecasts, and hybrid systems (embedded systems mixing continuous and discrete behaviors). FP arithmetic corresponds to scientific notation with a limited number of digits for the integer significand. On modern processors, it is specified by the IEEE-754 standard which defines formats, attributes and roundings, exceptional values, and exception handling. FP arithmetic lacks several basic properties of real arithmetic; for example, addition is not associative. FP arithmetic is therefore often considered as strange and unintuitive. This chapter presents some basic knowledge about FP arithmetic, including numbers and their encoding, and operations and rounding. Further readings about FP arithmetic include.

Keywords

AMD-K5 and AMD-K7; Computer arithmetic; Coq proof assistant; Flocq; FP algorithms; FP operations; IEEE-754 standard; Muller's sequence
Roughly speaking, floating-point (FP) arithmetic is the way numerical quantities are handled by the computer. Many different programs rely on FP computations such as control software, weather forecasts, and hybrid systems (embedded systems mixing continuous and discrete behaviors). FP arithmetic corresponds to scientific notation with a limited number of digits for the integer significand. On modern processors, it is specified by the IEEE-754 standard [IEE 08] which defines formats, attributes and roundings, exceptional values, and exception handling. FP arithmetic lacks several basic properties of real arithmetic; for example, addition is not associative. FP arithmetic is therefore often considered as strange and unintuitive. This chapter presents some basic knowledge about FP arithmetic, including numbers and their encoding, and operations and rounding. Further readings about FP arithmetic include [STE 74, GOL 91, MUL 10].
This chapter is organized as follows: section 1.1 provides a high-level view of FP numbers as a discrete set, and a high-level view of rounding and FP operations. Section 1.2 shows some simple results on the round-off error of a computation. Section 1.3 presents a low-level view of FP numbers, which includes exceptional values such as NaNs or infinities and how operations behave on them. Section 1.4 gives additional definitions and results useful in the rest of the book: faithful rounding, double rounding, and rounding to odd.

1.1 FP numbers as real numbers

We begin with a high-level view of FP numbers, which will be refined in section 1.3. A definition of FP formats and numbers is given in section 1.1.1. An important quantity is the unit in the last place (ulp) of an FP number defined in section 1.1.2. A definition of rounding and the standard rounding modes are given in section 1.1.3. Some FP operations and what they should compute are given in section 1.1.4.

1.1.1 FP formats

Let us consider an integer Ī² called the radix. It is usually either 2 or 10. In a simplified model, an FP number is just a real value mĪ²e satisfying some constraints on m and e given below. The integers m and e are called the integer significand and the exponent. The usual FP formats only consider FP numbers mĪ²e with | m | < Ī²Ļ±, with Ļ± being called the precision. Let us also bound the exponent: emin ā‰¤ e ā‰¤ emax. An FP number is therefore a real value representable...

Table of contents

  1. Cover
  2. Title page
  3. Table of Contents
  4. Copyright
  5. Preface
  6. List of Algorithms
  7. Introduction
  8. 1: Floating-Point Arithmetic
  9. 2: The Coq System
  10. 3: Formalization of Formats and Basic Operators
  11. 4: Automated Methods
  12. 5: Error-Free Computations and Applications
  13. 6: Example Proofs of Advanced Operators
  14. 7: Compilation of FP Programs
  15. 8: Deductive Program Verification
  16. 9: Real and Numerical Analysis
  17. Bibliography
  18. Index