Make Computer Arithmetic Great Again?

Similar documents
Introduction to Computational Mathematics

Formal Verification of a Floating-Point Elementary Function

Scientific Computing. Error Analysis

MAT128A: Numerical Analysis Lecture Two: Finite Precision Arithmetic

SIPE: Small Integer Plus Exponent

Simultaneous floating-point sine and cosine for VLIW integer processors

Some issues related to double roundings

MS6021 Scientific Computing. MatLab and Python for Mathematical Modelling. Aimed at the absolute beginner.

CS 261 Fall Floating-Point Numbers. Mike Lam, Professor.

Lecture 10: Floating Point, Digital Design

CS 261 Fall Floating-Point Numbers. Mike Lam, Professor.

LECTURE 0: Introduction and Background

Towards an industrial use of FLUCTUAT on safety-critical avionics software

Math 340 Fall 2014, Victor Matveev. Binary system, round-off errors, loss of significance, and double precision accuracy.

Floating Point Arithmetic

Augmented Arithmetic Operations Proposed for IEEE

Limits. f(x) and lim. g(x) g(x)

Bits, Words, and Integers

What Every Programmer Should Know About Floating-Point Arithmetic

Numerical computing. How computers store real numbers and the problems that result

High Performance Architecture for Reciprocal Function Evaluation on Virtex II FPGA

KS3 Progression Map: Number

2 Computation with Floating-Point Numbers

Floating-point numbers. Phys 420/580 Lecture 6

ANALYSIS AND SYNTHESIS OF FLOATING-POINT ROUTINES. Zvonimir Rakamarić

2 Computation with Floating-Point Numbers

A FLOATING POINT DIVISION UNIT BASED ON TAYLOR-SERIES EXPANSION ALGORITHM AND ITERATIVE LOGARITHMIC MULTIPLIER

Most nonzero floating-point numbers are normalized. This means they can be expressed as. x = ±(1 + f) 2 e. 0 f < 1

Lecture 1 Contracts. 1 A Mysterious Program : Principles of Imperative Computation (Spring 2018) Frank Pfenning

CSE 417 Practical Algorithms. (a.k.a. Algorithms & Computational Complexity)

Verification of Numerical Results, using Posits, Valids, and Quires

AM205: lecture 2. 1 These have been shifted to MD 323 for the rest of the semester.

Table : IEEE Single Format ± a a 2 a 3 :::a 8 b b 2 b 3 :::b 23 If exponent bitstring a :::a 8 is Then numerical value represented is ( ) 2 = (

Winfried Auzinger, Dirk Praetorius (SS2012)

When double rounding is odd

0001 Understand the structure of numeration systems and multiple representations of numbers. Example: Factor 30 into prime factors.

Semantics via Syntax. f (4) = if define f (x) =2 x + 55.

VHDL IMPLEMENTATION OF IEEE 754 FLOATING POINT UNIT

Lecture 1 Contracts : Principles of Imperative Computation (Fall 2018) Frank Pfenning

Computational Methods. Sources of Errors

Outline. What is Performance? Restating Performance Equation Time = Seconds. CPU Performance Factors

CS 61C: Great Ideas in Computer Architecture Performance and Floating-Point Arithmetic

ECE232: Hardware Organization and Design

Floating-Point Arithmetic

Binary floating point encodings

correlated to the Michigan High School Mathematics Content Expectations

Efficient implementation of elementary functions in the medium-precision range

Proof of Properties in FP Arithmetic

Review of Calculus, cont d

Exact real arithmetic. Keith Briggs

Chapter Fourteen Bonus Lessons: Algorithms and Efficiency

Real Numbers finite subset real numbers floating point numbers Scientific Notation fixed point numbers

Notes on Turing s Theorem and Computability

COS 323: Computing for the Physical and Social Sciences

Year 7 Knowledge/Content Understanding Skills Students will

CURRICULUM STRUCTURE Topics Covered Term 1: Term 2: Term 3:

Integrated Math I. IM1.1.3 Understand and use the distributive, associative, and commutative properties.

CS 61C: Great Ideas in Computer Architecture Performance and Floating Point Arithmetic

RADIX CONVERSION FOR IEEE MIXED RADIX FLOATING-POINT ARITHMETIC

Voluntary State Curriculum Algebra II

Vector and Parallel Processors. Amdahl's Law

CS 61C: Great Ideas in Computer Architecture Performance and Floating-Point Arithmetic

Time Complexity of an Algorithm

Floating-Point Arithmetic

Polynomial and Rational Functions. Copyright Cengage Learning. All rights reserved.

Floating Point. CSE 351 Autumn Instructor: Justin Hsia

ARM Performance Libraries Current and future interests

Roundoff Errors and Computer Arithmetic

MAT128A: Numerical Analysis Lecture One: Course Logistics and What is Numerical Analysis?

The do s and don ts of error handling. Joe Armstrong

The Attraction of Complexity

Truncation Errors. Applied Numerical Methods with MATLAB for Engineers and Scientists, 2nd ed., Steven C. Chapra, McGraw Hill, 2008, Ch. 4.

CPSC 121 Some Sample Questions for the Final Exam Tuesday, April 15, 2014, 8:30AM

AN ALGORITHM WHICH GENERATES THE HAMILTONIAN CIRCUITS OF A CUBIC PLANAR MAP

LECTURE 4. Logic Design

Data Representation Type of Data Representation Integers Bits Unsigned 2 s Comp Excess 7 Excess 8

CS6303 Computer Architecture Regulation 2013 BE-Computer Science and Engineering III semester 2 MARKS

Floating-point representation

MAT 003 Brian Killough s Instructor Notes Saint Leo University

Computing Integer Powers in Floating-Point Arithmetic

Lecture Numbers. Richard E Sarkis CSC 161: The Art of Programming

SHAPE, SPACE & MEASURE

Generating formally certified bounds on values and round-off errors

EC121 Mathematical Techniques A Revision Notes

Floating Point Puzzles. Lecture 3B Floating Point. IEEE Floating Point. Fractional Binary Numbers. Topics. IEEE Standard 754

Floating point. Today! IEEE Floating Point Standard! Rounding! Floating Point Operations! Mathematical properties. Next time. !

Maths: Phase 5 (Y12-13) Outcomes

Algorithms in Systems Engineering IE172. Midterm Review. Dr. Ted Ralphs

Counting shapes 1.4.6

STEPHEN WOLFRAM MATHEMATICADO. Fourth Edition WOLFRAM MEDIA CAMBRIDGE UNIVERSITY PRESS

APPENDIX B. Fortran Hints

Lecture 10: Floating Point, Digital Design

Computer Systems C S Cynthia Lee

Skill 1: Multiplying Polynomials


Julia Calculator ( Introduction)

Computer Organization & Assembly Language Programming

Imelda C. Go, South Carolina Department of Education, Columbia, SC

Floating Point January 24, 2008

Dynamics and Vibrations Mupad tutorial

Transcription:

Make Computer Arithmetic Great Again? Jean-Michel Muller CNRS, ENS Lyon, Inria, Université de Lyon France ARITH-25 June 2018

-2- An apparent contradiction low number of paper submissions to Arith these last 5 years few PhD defenses, few academic positions (at least in North America) and yet... just in the last 9 months, good arithmetic-related papers in IEEE Trans. VLSI, IEEE Trans. Computers, ACM TOMS, Mathematics in Computer Science, Numerical Algorithms, Mathematics of Computation, BIT... by authors who don t or rarely frequent the Arith conferences; people in the industry still design arithmetic operators, they also have new needs: deep learning, certified and /or reproducible calculations (e.g. for automated transportation), mixed precision... Why don t we see these people?

-3- Why don t we see these people? because it is seldom pure arithmetic, merely arithmetic and something; because if they submitted to Arith, we might well reject their papers!

-3- Why don t we see these people? because it is seldom pure arithmetic, merely arithmetic and something; because if they submitted to Arith, we might well reject their papers! (and we probably have)

-3- Why don t we see these people? because it is seldom pure arithmetic, merely arithmetic and something; because if they submitted to Arith, we might well reject their papers! (and we probably have) Necessary expertise in related areas: our community still has expertise on circuit design; we have low expertise in numerical analysis, compilation, formal proof, finite field arithmetic... The domain changed: we used to have a few formats: single precision, double precision; a few applications: numerical simulation, financial calculations.

Is there a thing such as an Universal solution? Numerical simulation Embedded computing Entertainment -4-

Is there a thing such as an Universal solution? Numerical simulation Embedded computing trillions of operations floating-point (dynamic range, speed, accuracy) crash? just start again the simulation (but not too often) Entertainment -4-

Is there a thing such as an Universal solution? Numerical simulation trillions of operations floating-point (dynamic range, speed, accuracy) crash? just start again the simulation (but not too often) Embedded computing speed: no need to be faster than real time; crash? ahem... certified calculations. Entertainment -4-

Is there a thing such as an Universal solution? Numerical simulation trillions of operations floating-point (dynamic range, speed, accuracy) crash? just start again the simulation (but not too often) Embedded computing speed: no need to be faster than real time; crash? ahem... certified calculations. Entertainment supermario s pizza does not need to carefully follow the laws of physics; fluidity matters. -4-

Playing with different formats? See Nick Higham s talk at Arith 24. single precision (a.k.a. binary32) double precision (a.k.a. binary64) exotic ad-hoc formats binary16 binary32 binary64 binary128 (quad) Combinatorial explosion of all the possible arithmetic operators of the form Format 1 Format 2 Format 3. Cleverly using these formats: Locate when low precision puts us at an unacceptable risk. Numerical analysis abstract interpretation Locate when big precision totally destroys performance. Compilation Computer architecture -5-

-6- Reproducible computing: useful and sometimes dangerous Reproducibility in computer arithmetic: examples are Reproducible Basic Linear Algebra Subprograms at Berkeley (https://bebop.cs.berkeley.edu/reproblas/); paper on reproducible summation by P. Ahrens, H.D. Nguyen and J. Demmel. Main arguments in favor of reproducibility: consistence (parallelism: sometimes evaluating the same expression in different places is cheaper than transmitting it); debugging is difficult if we cannot reproduce errors; contractual/legal reasons. Significant demand (from HPC) and interesting problems need to work on these issues.

-7- Reproducible computing: useful and sometimes dangerous However... obtaining very different results when running the same program twice is a sign that something weird is going on (of physical, numerical or programming origin). This is an useful warning, not to be disabled systematically; the legal reasons are fine, but there may as well be legal reasons against reproducibility: be ready to explain to a court that you deliberately delivered a less accurate result.

-8- Libraries of math functions Number of functions 1 "generic" + # of architectures Number of FP formats # of priorities: accuracy latency throughput... thousands of function programs impossible to debug, maintain, keep consistent, improve... and physicists would like many other functions

-9- First solution: computer-assisted library design Metalibm project (http://www.metalibm.org). Two versions fully automated for the end user; assistance for the specialist. Metalibm builds upon tools such as Sollya (http://sollya.gforge.inria.fr): get approximations with many possible constraints; Gappa (http://gappa.gforge.inria.fr): tight bounds to polynomial evaluation errors and formal proofs. But this is not the ultimate goal

Tools from computer algebra Differential equation Taylor expansions Symmetries Singularities Asymptotic expansions Periodicity Decent code that implements the function NumGfun: a Package for Numerical and Analytic Computation with D-finite Functions. ISSAC 2010. Mezzarobba s PhD dissertation Autour de l évaluation numérique des fonctions D-finies (Ecole Polytechnique, Paris, 2011); complex mathematics but big reward. Incidentally, people from computer algebra need us to speed up various algebraic computations.

-11- Tools from computer algebra Dynamic Dictionary of Mathematical Functions: http://ddmf.msr-inria.inria.fr/1.9.1/ddmf

Generation of functions at compile-time take into account the exact context: underlying architecture, accuracy requirements, priorities (latency/throughput); possibly, information on input domain ( simplify/avoid range reduction), or special cases (e.g., infinities, NaNs known not to happen); compound functions: if you need E 4 (x) = x e x 1 ln(1 e x ), then you directly generate E 4 (x) instead of generating exp, ln and combining them. formal proof absolutely necessary (no library to heavily test beforehand); need to work with people from mathematics, computer algebra, compilation, formal proof...

-13- Alternate number representations? I am not a big fan of Unums, but I reckon J. Gustafson has a point: the considerable increase, in the last 20 years, of the ratio time to read/write in memory time to perform +,,, should be viewed as an interesting challenge, not as a sign that we have become useless. we have time to do more things attach easy-to-compute additional information to FP numbers? develop communication-avoiding algorithms.

-14- Other topics of interest Approximate computing. Requires more science than computing exactly : estimate largest errors, average errors, probabilities of failures, make sure branches are taken consistently,... Complex arithmetic that is i. accurate; ii. fast, and iii. overflow/underflow-safe; large interchange formats (we will more and more have to deal with data from sensors, previous computations, databases,... ); hide divisions (this is not only the compiler s task: for instance one can choose rational approximations that help); one day, the quantum computer will be here. Do you want some physicist to re-invent the carry-skip adder or the Dadda multiplier for it?...

Time travel Arith 14, 1999.

Time travel Arith 14, 1999. Some sessions: Addition Division Divide and Square root Multiplication and Rounding CORDIC algorithms Quite a change, isn t it?

Time travel Arith 14, 1999. Some sessions: Addition Division Divide and Square root Multiplication and Rounding CORDIC algorithms Quite a change, isn t it? Need to anticipate the changes: invited talks, PC,...