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

Slides:



Advertisements
Similar presentations
Proofs and Programs Wei Hu 11/01/2007. Outline  Motivation  Theory  Lambda calculus  Curry-Howard Isomorphism  Dependent types  Practice  Coq Wei.
Advertisements

Number Representation Part 2 Little-Endian vs. Big-Endian Representations Floating Point Representations ECE 645: Lecture 5.
1 Theorem Proving and Model Checking in PVS A Proving Software with PVS Edmund Clarke Daniel Kroening Carnegie Mellon University.
1 DATA ABSTRACTION: USER DEFINED TYPES AND THE CLASS.
Computer Engineering FloatingPoint page 1 Floating Point Number system corresponding to the decimal notation 1,837 * 10 significand exponent A great number.
1 Chapter Six Algorithms. 2 Algorithms An algorithm is an abstract strategy for solving a problem and is often expressed in English A function is the.
Numerical Analysis 1 EE, NCKU Tien-Hao Chang (Darby Chang)
Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved Floating-point Numbers.
Floating Point Representation in Computers Floating Point Numbers - What are they? Floating Point Representation Floating Point Operations Where Things.
Floating Point Numbers
ECE 667 Student Presentation Gayatri Prabhu [1]. *PHDD: An Efficient Graph Representation for Floating Point Circuit Verification – Y. Chen, R. Bryant,
CS267 L13 Floating Point.1 Demmel Sp 1999 CS 267 Applications of Parallel Computers Lecture 13: Floating Point Arithmetic James Demmel
1 CSE1301 Computer Programming Lecture 30: Real Number Representation.
CSE1301 Computer Programming Lecture 33: Real Number Representation
Dr Damian Conway Room 132 Building 26
Copyright 2008 Koren ECE666/Koren Sample Mid-term 1.1 Israel Koren Spring 2008 UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering Digital.
Floating-Point and High-Level Languages Programming Languages Spring 2004.
1 Module 2: Floating-Point Representation. 2 Floating Point Numbers ■ Significant x base exponent ■ Example:
Floating Point Numbers
Computer Science A 14: 3/4. Computing with numbers - Precision - Representation - Computing with numbers - Example.
Computer Science 210 Computer Organization Floating Point Representation.
©2000 Addison Wesley IEEE 754 single precision floating-point number format.
Floating Point Computation
Numeric precision in SAS. Two aspects of numeric data in SAS The first is how numeric data are stored (how a number is represented in the computer). –
Fixed-Point Arithmetics: Part II
Lecture 2 Number Representation and accuracy
Number Systems So far we have studied the following integer number systems in computer Unsigned numbers Sign/magnitude numbers Two’s complement numbers.
CISE301_Topic11 CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4:
Introduction to Numerical Analysis I
Computer Architecture
Automatic Generation of Staged Geometric Predicates Aleksandar Nanevski, Guy Blelloch and Robert Harper PSCICO project
Topic 2 – Introduction to Computer Codes. Computer Codes A code is a systematic use of a given set of symbols for representing information. As an example,
Ratio and Proportion cdcd abab = proportion: two ratios that are equal to each other. cross products of proportions are equal (b)(c) = (a)(d) Review: 2323.
Data Representation - Part II. Characters A variable may not be a non-numerical type Character is the most common non- numerical type in a programming.
Floating Point. Agenda  History  Basic Terms  General representation of floating point  Constructing a simple floating point representation  Floating.
Data Representation in Computer Systems
Computer Science Engineering B.E.(4 th sem) c omputer system organization Topic-Floating and decimal arithmetic S ubmitted to– Prof. Shweta Agrawal Submitted.
ECEG-3202: Computer Architecture and Organization, Dept of ECE, AAU 1 Floating-Point Arithmetic Operations.
Notes - Solving Quadratic Equations in Factored Form If ab = 0, then a = 0 or b = 0 If the product of two factors is zero, then at least one of the factors.
Ch 8: Exponents B) Zero & Negative Exponents
CSC 221 Computer Organization and Assembly Language
Integer & Floating Point Representations CDA 3101 Discussion Session 05.
1 Number Systems Lecture 10 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier, 2007.
Floating Point Arithmetic
Computer Engineering FloatingPoint page 1 Floating Point Number system corresponding to the decimal notation 1,837 * 10 significand exponent A great number.
Verification & Validation By: Amir Masoud Gharehbaghi
IT11004: Data Representation and Organization Floating Point Representation.
CS 232: Computer Architecture II Prof. Laxmikant (Sanjay) Kale Floating point arithmetic.
Sources of Computational Errors FLP approximates exact computation with real numbers Two sources of errors to understand and counteract: 1. Representation.
CH.3 Floating Point Hardware and Algorithms 3/10/
Frederico Araujo CS6362 – Fall 2010 Automated Theorem Proving.
Fixed-point and floating-point numbers Ellen Spertus MCS 111 October 4, 2001.
Formal verification of distance vector routing protocols.
Computer Organization & Design 计算机组成与设计 Weidong Wang ( 王维东 ) College of Information Science & Electronic Engineering 信息与通信工程研究所 Zhejiang.
Cosc 2150: Computer Organization Chapter 9, Part 3 Floating point numbers.
1 CE 454 Computer Architecture Lecture 4 Ahmed Ezzat The Digital Logic, Ch-3.1.
Introduction to Numerical Analysis I
Floating Point Representations
Multiplying with exponents
Computer Science 210 Computer Organization
CS 232: Computer Architecture II
Chapter 6 Floating Point
Recall our hypothetical computer Marc-32
CSCI206 - Computer Organization & Programming
Floating Point Representation
Computer Science 210 Computer Organization
Floating Point Arithmetic
Copyright © Cengage Learning. All rights reserved.
Copyright © Cengage Learning. All rights reserved.
Floating Point Arithmetic
Presentation transcript:

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

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

Related Works n PVS: Miner (IEEE 784) n ACL2: Russinoff (IEEE 754) n HOL: Harrison (IEEE 754)

Outline n Floating-point numbers n Formalization n Simple program verification n Expansion

E- 99 ExponentMantissaPrecision E+ 20 Floating-point numbers Normal: Subnormal: E+ 20 Canonic

Rounding 0

Formalization: float Arbitrary base:  nat n New type: float n Abstract representation:  n,p  n  p FtoR

Formalization: float n Bias: n Non-Unicity:  ,15  Projectors:  n[p], e[p] n Equality: p = q Order: p  q E+20  86766,16 

Formalization: float n Zero:  0,0  n One:  1,0  Addition:  n[p]  +n[q] ,u  where u=min(e[p],e[q]) Multiplication:  n[p]  n[q],e[p]+e[q]  e[p]-ue[q]-u

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

Rounding n Predicate: R(r,p) n Total: n Compatible: n Monotone: n Min or Max:

Proof Sterbenz:

Theorem n n n 1.00 E+9 and 1.11 E+10 Dekker

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 Y=2 Y=10

First Loop while (X+1.0)-X=1.0 do X:=X*2.0 ,0   102,1  0

Second Loop while (X+Y)-X<>Y do Y:=Y+1.0 

Formal Proof n Direct n General Statement n Arbitrary base n Arbitrary format n Arbitrary rounding

Exact computing n Rounding errors n Basic operations n Applications a b abab 

Expansion n List: n Non-overlapping: n Sorted

Building an expansion

Adding a float to an expansion... f

Adding two expansions...

Library n Lines n 90 Definitions n 780 Theorems

Conclusions n Generic Library n Precise Statements n Checking Proofs