1 / 24

A generic library for floating-point numbers and its application to exact computing

TPHOLs’2001. A generic library for floating-point numbers and its application to exact computing. Marc Daumas, Laurence Rideau, Laurent Théry. Motivations. Applying theorem proving (AOC) Scientific computing Standard (IEEE 754) New results Checking proofs. Related Works.

binh
Download Presentation

A generic library for floating-point numbers and its application to exact computing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. TPHOLs’2001 A generic library for floating-point numbers and its application to exact computing Marc Daumas, Laurence Rideau, Laurent Théry

  2. Motivations • Applying theorem proving (AOC) • Scientific computing • Standard (IEEE 754) • New results • Checking proofs

  3. Related Works • PVS: Miner (IEEE 784) • ACL2: Russinoff (IEEE 754) • HOL: Harrison (IEEE 754)

  4. Outline • Floating-point numbers • Formalization • Simple program verification • Expansion

  5. Mantissa Precision Exponent Floating-point numbers 8.676600 E+ 20 Normal: 8.676600 E+ 20 Canonic Subnormal: -0.002300 E- 99

  6. Rounding 0

  7. Formalization: float • Arbitrary base: b: nat • New type: float • Abstract representation: n,p n*b FtoR p

  8. 86766,16  Formalization: float • Bias: • Non-Unicity:867660,15 • Projectors:n[p], e[p] • Equality: p = q • Order: p < q 8.676600 E+20

  9. Formalization: float • Zero: 0,0 • One: 1,0 • Addition: n[p]*b +n[q]*b ,u whereu=min(e[p],e[q]) • Multiplication: n[p]* n[q],e[p]+e[q] e[p]-u e[q]-u

  10. float bounded Bounded • Arbitrary bound: b (N[b],E[b]) • Bounded float: • Restricted quantification

  11. Rounding • Predicate: R(r,p) • Total: • Compatible: • Monotone: • Min or Max:

  12. Proof Sterbenz:

  13. Theorem 1.00 E+9 and 1.11 E+10 Dekker

  14. Y=2 Y=10 Example X := 1.0; Y := 1.0 while (X+1.0)-X=1.0 do X:=X*2.0 while (X+Y)-X<>Y do Y:=Y+1.0

  15. 102,1 First Loop while (X+1.0)-X=1.0 do X:=X*2.0 512 128 256 16 32 64 1 2 4 8 0  ,0

  16. Second Loop while (X+Y)-X<>Y do Y:=Y+1.0 b

  17. Formal Proof • Direct • General Statement • Arbitrary base • Arbitrary format • Arbitrary rounding

  18. D Exact computing • Rounding errors • Basic operations • Applications a ab b

  19. Expansion • List: • Non-overlapping: • Sorted 10011010000 11001111101

  20. 101111 111000 111100 Building an expansion 10111100011100000000000000001111

  21. Adding a float to an expansion ... f ...

  22. Adding two expansions ... ...

  23. Library • 20000 Lines • 90 Definitions • 780 Theorems

  24. Conclusions • Generic Library • Precise Statements • Checking Proofs

More Related