Automatically improving floating point code
|
|
- Bertha Cook
- 6 years ago
- Views:
Transcription
1 Automatically improving floating point code
2 Scientists Write Code Every scientist needs to write code Analyze data Simulate models Control experiments
3 Scientists Write Code Every scientist needs to write code Analyze data Simulate models Control experiments They have little computer science training
4 How scientific code is written 1. Come up with mathematical formula
5 How scientific code is written 1. Come up with mathematical formula 2. Write as floating-point code f(x) sqrt(x + 1) - sqrt(x)
6 How scientific code is written f(x) sqrt(x + 1) - sqrt(x) 3. Test code f(1) =
7 How scientific code is written f(x) sqrt(x + 1) - sqrt(x) 3. Test code f(1) = Publish
8 But try a few other values... f( ) = 7.451e-9
9 But try a few other values... f( ) = 7.451e-9 That s a 16% error!
10 Outline Why did this happen? How can we fix it? How does Casio help?
11 Outline Why did this happen? How can we fix it? How does Casio help?
12 Why did this happen? Because floating-point is imprecise!
13 Why did this happen? Because floating-point is imprecise! We want something more constructive.
14 Why did this happen? Because floating-point is imprecise! We want something more constructive. Rounding
15 Why did this happen? Because floating-point is imprecise! We want something more constructive. Rounding Let s try to be a bit more precise
16 Let s try to be a bit more precise
17 Let s try to be a bit more precise Rounding error
18 Let s try to be a bit more precise % error % error.03% error Rounding error
19 Let s try to be a bit more precise % error % error.03% error Rounding error Error in output proportional to size of input.
20 For our example
21 For our example
22 For our example
23 For our example
24 So, in summary Code is numerically imprecise The subtraction is the culprit Figuring out why was hard
25 Outline Why did this happen? How can we fix it? How does Casio help?
26 How can we fix it? Run with higher precision? Software floating point is slow. Add correction terms? Very hard to do; very error-prone
27 How can we fix it? Better idea: rephrase the program Compute the same thing in a different way. Somehow get rid of the subtraction
28 One way of rephrasing it
29 One way of rephrasing it
30 One way of rephrasing it
31 One way of rephrasing it
32 One way of rephrasing it
33 Implementing this rephrasing f(x) = 1/(sqrt(x + 1) + sqrt(x)) This version has effectively no error.
34 Implementing this rephrasing f(x) = 1/(sqrt(x + 1) + sqrt(x)) This version has effectively no error. But it s a harder to understand: Is this computing the right function?
35 So, in summary Problem solved Algebraic ingenuity required Fixing it was hard
36 Outline Why did this happen? How can we fix it? How does Casio help?
37 How does Casio help? Diagnosing and fixing precision problems is hard
38 How does Casio help? Diagnosing and fixing precision problems is hard Casio automatically Computes error Finds better code
39 How does Casio help? Diagnosing and fixing precision problems is hard Casio automatically Computes error Finds better code Resulting expression is the same over the reals but better over the floats
40 Automatically computing error Compute exact answers with arbitrary precision Use program analysis tools to find bad subexpressions
41 Automatically improving code Small database of mathematical identities e.g. a - a = 0 e.g. a 2 - b 2 = (a + b) (a - b) Apply identities to the problem subexpression recursive goal-directed rewrite Evaluate resulting code versus exact answer
42 Inner Loop Equation Input Distribution
43 Inner Loop Equation Computed Output Input Distribution Exact Output Arbitrary Precision
44 Inner Loop Equation Computed Output Bad Subexpressions Input Distribution Exact Output Arbitrary Precision Program Analysis
45 Inner Loop Rewrite Database Equation Computed Output Bad Subexpressions Candidate Programs Input Distribution Exact Output Arbitrary Precision Program Analysis Rewrite Generation
46 Inner Loop Rewrite Database Equation Computed Output Bad Subexpressions Candidate Programs Best Candidates Input Distribution Exact Output Arbitrary Precision Program Analysis Rewrite Generation Ranking
47 Domain Knowledge Simplification Inferring branch conditions Periodicity analysis
48 > (improve '(λ (x) (- (sqrt (+ x 1)) (sqrt x))) 3)
49 > (improve '(λ (x) (- (sqrt (+ x 1)) (sqrt x))) 3) (λ (x) (if (< x ) (- (sqrt (+ x 1)) (sqrt x)) (/ 1 (+ (sqrt x) (sqrt (+ x 1))))))
50 > (improve '(λ (x) (- (sqrt (+ x 1)) (sqrt x))) 3) (λ (x) (if (< x ) (- (sqrt (+ x 1)) (sqrt x)) (/ 1 (+ (sqrt x) (sqrt (+ x 1)))))) Improvement by an average of 23.2 bits
51
52
53 Future work Extracting floating point computation from code More domain knowledge Provide explanation of what Casio did Unsound rewrites
MATH 2650/ Intro to Scientific Computation - Fall Lab 1: Starting with MATLAB. Script Files
MATH 2650/3670 - Intro to Scientific Computation - Fall 2017 Lab 1: Starting with MATLAB. Script Files Content - Overview of Course Objectives - Use of MATLAB windows; the Command Window - Arithmetic operations
More informationTAKS Mathematics Practice Tests Grade 6, Test B
Question TAKS Objectives TEKS Student Expectations 1 Obj. 4 The student will demonstrate an uses of measurement. (6.8) (A) estimate measurements and evaluate reasonableness of results. 2 Obj. 3 The student
More information1. Solve the system by graphing: x y = 2 2. Solve the linear system using any method. 2x + y = -7 2x 6y = 12
1. Solve the system by graphing: x y =. Solve the linear system using any method. x + y = -7 x 6y = 1 x + y = 8 3. Solve the linear system using any method. 4. A total of $0,000 is invested in two funds
More informationLECTURE 0: Introduction and Background
1 LECTURE 0: Introduction and Background September 10, 2012 1 Computational science The role of computational science has become increasingly significant during the last few decades. It has become the
More informationKey Terms. Writing Algebraic Expressions. Example
Chapter 6 Summary Key Terms variable (6.1) algebraic expression (6.1) evaluate an algebraic expression (6.1) Distributive Property of Multiplication over Addition (6.2) Distributive Property of Multiplication
More informationA. Incorrect! You did not use the distributive property. The expression in parentheses was ignored.
Problem Solving Drill 06: Simple Equations Question No. 1 of 10 Question 1. Simplify the algebraic expression: 2x(4x 3) Question #01 (A) 2x (B) 8x 6 (C) 8x 2 6x (D) 8x 2 6 You did not use the distributive
More informationBinary floating point encodings
Week 1: Wednesday, Jan 25 Binary floating point encodings Binary floating point arithmetic is essentially scientific notation. Where in decimal scientific notation we write in floating point, we write
More informationA Constant Rate of Change Name Part 1
A Constant Rate of Change Name Part 1 Consider the function table below. Complete this page by solving the problems at the bottom. Use a separate sheet of paper for your descriptions and explanations.
More informationMany logarithms may be calculated by converting them to exponential form. Suppose we want to calculate the value of log. log 16?
Question : How do you evaluate a arithm? Many arithms may be calculated by converting them to exponential form. Suppose we want to calculate the value of arithmic form, 16. Start by writing this expression
More informationMark Important Points in Margin. Significant Figures. Determine which digits in a number are significant.
Knowledge/Understanding: How and why measurements are rounded. Date: How rounding and significant figures relate to precision and uncertainty. When significant figures do not apply. Skills: Determine which
More information1.3.B Significant Figures
1.3.B Significant Figures The Scientific Method starts with making observations = precise and accurate measurements 1.3.3. Significant Figures (Significant Digits) 1.3.4. Round Off Error Measurement and
More information2.Simplification & Approximation
2.Simplification & Approximation As we all know that simplification is most widely asked topic in almost every banking exam. So let us try to understand what is actually meant by word Simplification. Simplification
More informationSection 1.5. Finding Linear Equations
Section 1.5 Finding Linear Equations Using Slope and a Point to Find an Equation of a Line Example Find an equation of a line that has slope m = 3 and contains the point (2, 5). Solution Substitute m =
More informationMath 7 Proficiency Scale Quarter 1
Adding & Subtracting Rational Numbers Math 7 Proficiency Scale Quarter 1 1 = Novice 2 = Partially Proficient Engaged in the practice of adding and subtracting whole numbers. Represents addition and subtraction
More informationComputational Methods. Sources of Errors
Computational Methods Sources of Errors Manfred Huber 2011 1 Numerical Analysis / Scientific Computing Many problems in Science and Engineering can not be solved analytically on a computer Numeric solutions
More informationState Approved Calculators for Standards of Learning Testing: Guidelines and Preparation Instructions for Testing
Standards of Learning (SOL) Assessment Grade 4 Mathematics Grade 4 Plain English Mathematics Grade 5 Mathematics Grade 5 Plain English Mathematics Grade 5 Science Grade 6 Mathematics Grade 6 Plain English
More informationMath 2B Linear Algebra Test 2 S13 Name Write all responses on separate paper. Show your work for credit.
Math 2B Linear Algebra Test 2 S3 Name Write all responses on separate paper. Show your work for credit.. Construct a matrix whose a. null space consists of all combinations of (,3,3,) and (,2,,). b. Left
More informationComputer Arithmetic. 1. Floating-point representation of numbers (scientific notation) has four components, for example, 3.
ECS231 Handout Computer Arithmetic I: Floating-point numbers and representations 1. Floating-point representation of numbers (scientific notation) has four components, for example, 3.1416 10 1 sign significandbase
More informationTruncation Errors. Applied Numerical Methods with MATLAB for Engineers and Scientists, 2nd ed., Steven C. Chapra, McGraw Hill, 2008, Ch. 4.
Chapter 4: Roundoff and Truncation Errors Applied Numerical Methods with MATLAB for Engineers and Scientists, 2nd ed., Steven C. Chapra, McGraw Hill, 2008, Ch. 4. 1 Outline Errors Accuracy and Precision
More informationFloating-point numbers. Phys 420/580 Lecture 6
Floating-point numbers Phys 420/580 Lecture 6 Random walk CA Activate a single cell at site i = 0 For all subsequent times steps, let the active site wander to i := i ± 1 with equal probability Random
More informationFloating-Point Arithmetic
Floating-Point Arithmetic 1 Numerical Analysis a definition sources of error 2 Floating-Point Numbers floating-point representation of a real number machine precision 3 Floating-Point Arithmetic adding
More informationPaper Reference(s) 6672 Edexcel GCE Pure Mathematics P2 Advanced/Advanced Subsidiary Monday 20 January 2003 Morning Time: 1 hour 30 minutes
Paper Reference(s) 6672 Edexcel GCE Pure Mathematics P2 Advanced/Advanced Subsidiary Monday 20 January 2003 Morning Time: 1 hour 30 minutes Materials required for examination Answer Book (AB16) Graph Paper
More informationB553 Lecture 12: Global Optimization
B553 Lecture 12: Global Optimization Kris Hauser February 20, 2012 Most of the techniques we have examined in prior lectures only deal with local optimization, so that we can only guarantee convergence
More information6.1 Evaluate Roots and Rational Exponents
VOCABULARY:. Evaluate Roots and Rational Exponents Radical: We know radicals as square roots. But really, radicals can be used to express any root: 0 8, 8, Index: The index tells us exactly what type of
More informationArbitrary Precision and Symbolic Calculations
Arbitrary Precision and Symbolic Calculations K. 1 1 Department of Mathematics 2018 Sympy There are several packages for Python that do symbolic mathematics. The most prominent of these seems to be Sympy.
More informationMHCA Math Summer Packet 2015
MHCA Math Summer Packet 2015 Directions: For students entering Algebra 2 CP You are to complete all the problems assigned in this packet by Friday, September 4 th. If you don t turn in your summer packet
More informationFunctions. Edexcel GCE. Core Mathematics C3
Edexcel GCE Core Mathematics C Functions Materials required for examination Mathematical Formulae (Green) Items included with question papers Nil Advice to Candidates You must ensure that your answers
More informationThe School District of Palm Beach County Fourth Grade Mathematics Scope st Trimester
Number and Operations in Base Ten Generalize place value understanding for multi-digit whole numbers. NBT.1.1 NBT.1.2 NBT.1.3 Recognize that in a multi-digit whole number, a digit in one place represents
More informationMODERN FACTOR ANALYSIS
MODERN FACTOR ANALYSIS Harry H. Harman «ö THE pigj UNIVERSITY OF CHICAGO PRESS Contents LIST OF ILLUSTRATIONS GUIDE TO NOTATION xv xvi Parti Foundations of Factor Analysis 1. INTRODUCTION 3 1.1. Brief
More informationMath Interim Mini-Tests. 3rd Grade Mini-Tests
3rd Grade Mini-Tests Mini-Test Name Availability Area of Plane Figures-01 Gr 3_Model, Reason, & Solve Problems-04 Multiplicative Properties & Factors-01 Patterns & Using the Four Operations-01 Real-World
More informationMathematical preliminaries and error analysis
Mathematical preliminaries and error analysis Tsung-Ming Huang Department of Mathematics National Taiwan Normal University, Taiwan August 28, 2011 Outline 1 Round-off errors and computer arithmetic IEEE
More informationYOGYAKARTA STATE UNIVERSITY MATHEMATICS AND NATURAL SCIENCES FACULTY MATHEMATICS EDUCATION STUDY PROGRAM
YOGYAKARTA STATE UNIVERSITY MATHEMATICS AND NATURAL SCIENCES FACULTY MATHEMATICS EDUCATION STUDY PROGRAM TOPIC 1 INTRODUCING SOME MATHEMATICS SOFTWARE (Matlab, Maple and Mathematica) This topic provides
More informationHFCC Math Lab Intermediate Algebra 1 SLOPE INTERCEPT AND POINT-SLOPE FORMS OF THE LINE
HFCC Math Lab Intermediate Algebra SLOPE INTERCEPT AND POINT-SLOPE FORMS OF THE LINE THE EQUATION OF A LINE Goal I. Use the slope-intercept form of the line to write the equation of a non-vertical line
More informationSlide Set 18. for ENCM 339 Fall 2017 Section 01. Steve Norman, PhD, PEng
Slide Set 18 for ENCM 339 Fall 2017 Section 01 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary December 2017 ENCM 339 Fall 2017 Section 01
More informationGUIDED NOTES 3.1 FUNCTIONS AND FUNCTION NOTATION
GUIDED NOTES 3.1 FUNCTIONS AND FUNCTION NOTATION LEARNING OBJECTIVES In this section, you will: Determine whether a relation represents a function. Find the value of a function. Determine whether a function
More informationTuesday 22 January 2008 Afternoon Time: 1 hour 30 minutes
Paper Reference(s) 6666/0 Edexcel GCE Core Mathematics C4 Advanced Level Tuesday 22 January 2008 Afternoon Time: hour 30 minutes Materials required for examination Mathematical Formulae (Green) Items included
More informationVirtual views. Incremental View Maintenance. View maintenance. Materialized views. Review of bag algebra. Bag algebra operators (slide 1)
Virtual views Incremental View Maintenance CPS 296.1 Topics in Database Systems A view is defined by a query over base tables Example: CREATE VIEW V AS SELECT FROM R, S WHERE ; A view can be queried just
More informationOn a 64-bit CPU. Size/Range vary by CPU model and Word size.
On a 64-bit CPU. Size/Range vary by CPU model and Word size. unsigned short x; //range 0 to 65553 signed short x; //range ± 32767 short x; //assumed signed There are (usually) no unsigned floats or doubles.
More informationFloating Point Arithmetic
Floating Point Arithmetic Computer Systems, Section 2.4 Abstraction Anything that is not an integer can be thought of as . e.g. 391.1356 Or can be thought of as + /
More informationSquare Roots: Introduction & Simplification
Square Roots: Introduction & Simplification You already know about squaring. For instance, 2 2 = 4, 3 2 = 9, etc. The backwards of squaring is square-rooting. The symbol for square-rooting is " ", the
More informationChapter 4: Basic C Operators
Chapter 4: Basic C Operators In this chapter, you will learn about: Arithmetic operators Unary operators Binary operators Assignment operators Equalities and relational operators Logical operators Conditional
More informationObject Oriented Programming Using C++ Mathematics & Computing IET, Katunayake
Assigning Values // Example 2.3(Mathematical operations in C++) float a; cout > a; cout
More informationChoose the file menu, and select Open. Input to be typed at the Maple prompt. Output from Maple. An important tip.
MAPLE Maple is a powerful and widely used mathematical software system designed by the Computer Science Department of the University of Waterloo. It can be used for a variety of tasks, such as solving
More informationmandatory for Pre-AICE Geometry & Geometry Honors students
Name: Geometry Summer Packet Welcome to the study of Geometry! You have an opportunity this summer to help strengthen your skills. Please read the information below carefully. Also, please note that this
More informationLearning the Language - V
Learning the Language - V Fundamentals We now have locations to store things so we need a way to get things into those storage locations To do that, we use assignment statements Deja Moo: The feeling that
More informationAlgebra II Chapter 8 Part 2: Rational Functions
Algebra II Chapter 8 Part 2: Rational Functions Chapter 8 Lesson 4 Multiply and Divide Rational Functions Vocabulary Words to Review: Reciprocal The rules of fractions DO NOT change! *When adding and subtracting,
More informationBenchmarks Addressed. Quizzes. Strand IV, S 1-2, 1-4, 2-1, 2-2, 2-3, 3-1. Journal writing. Projects. Worksheets
August/September The Decimal System Translating English words into Decimal Notation What is the decimal system? Str IV, S 1-2, 1-4, 2-1, 2-2, 2-3, 3-1 Estimating Decimals What is a number line? Changing
More informationAlgebraic Expressions
P.1 Algebraic Expressions, Mathematical Models, and Real Numbers P.2 Exponents and Scientific Notation Objectives: Evaluate algebraic expressions, find intersection and unions of sets, simplify algebraic
More informationExtensible Pattern Matching
Extensible Pattern Matching Sam Tobin-Hochstadt PLT @ Northeastern University IFL, September 3, 2010 Extensible Pattern Matching in an Extensible Language Sam Tobin-Hochstadt PLT @ Northeastern University
More information1.8 Intro to Variables, Algebraic Expressions, and Equations
1.8 Intro to Variables, Algebraic Expressions, and Equations Professor Tim Busken M.S. Applied Mathematics with a Concentration in Dynamical Systems San Diego State University 2011 Southwestern College
More information1 Basic Mathematical Operations
1 Basic Mathematical Operations Recall the basic operations of addition, substraction, multiplication, and division. Consider evaluating the following expression: 2+3 5 Do we add 2 and 3 first or do we
More information2.1.1 Fixed-Point (or Integer) Arithmetic
x = approximation to true value x error = x x, relative error = x x. x 2.1.1 Fixed-Point (or Integer) Arithmetic A base 2 (base 10) fixed-point number has a fixed number of binary (decimal) places. 1.
More informationPolynomial and Rational Functions
Chapter 3 Polynomial and Rational Functions Review sections as needed from Chapter 0, Basic Techniques, page 8. Refer to page 187 for an example of the work required on paper for all graded homework unless
More informationGrade 7 Mathematics Performance Level Descriptors
Limited A student performing at the Limited Level demonstrates a minimal command of Ohio s Learning Standards for Grade 7 Mathematics. A student at this level has an emerging ability to work with expressions
More informationGraphics calculator instructions
Graphics calculator instructions Contents: A B C D E F G Basic calculations Basic functions Secondary function and alpha keys Memory Lists Statistical graphs Working with functions 10 GRAPHICS CALCULATOR
More informationReals 1. Floating-point numbers and their properties. Pitfalls of numeric computation. Horner's method. Bisection. Newton's method.
Reals 1 13 Reals Floating-point numbers and their properties. Pitfalls of numeric computation. Horner's method. Bisection. Newton's method. 13.1 Floating-point numbers Real numbers, those declared to be
More informationF453 Module 7: Programming Techniques. 7.2: Methods for defining syntax
7.2: Methods for defining syntax 2 What this module is about In this module we discuss: explain how functions, procedures and their related variables may be used to develop a program in a structured way,
More informationENGR Socolofsky
ENGR 102-213 - Socolofsky Date : due 9/3/2018 at 12:40 p.m. Engineering Lab I - Computation Lab Assignment #01b Writing Your Own Programs Return your solution (one per group) as outlined in the activities
More informationPrentice Hall Mathematics: Course Correlated to: The Pennsylvania Math Assessment Anchors and Eligible Content (Grade 8)
M8.A Numbers and Operations M8.A.1 Demonstrate an understanding of numbers, ways of representing numbers, relationships among numbers and number systems. M8.A.1.1 Represent numbers in equivalent forms.
More informationPaceamker Basic Math. Correlated to. Alaska Math Grade Level Expectations For Eighth Grade
Paceamker Basic Math Alaska Math Grade Level Expectations 1 Numeration Performance Standards M1.3.1 Read, write, model, and order real numbers, explaining scientific notation, exponents, and percents.
More informationIntroduction to Computer Programming for Non-Majors
Introduction to Computer Programming for Non-Majors CSC 2301, Fall 2016 Chapter 3 Instructor: Long Ma The Department of Computer Science Review of Chapter 2 Stages of creating a program: Analyze the problem
More informationModule 7 Highlights. Mastered Reviewed. Sections ,
Sections 5.3 5.6, 6.1 6.6 Module 7 Highlights Andrea Hendricks Math 0098 Pre-college Algebra Topics Degree & leading coeff. of a univariate polynomial (5.3, Obj. 1) Simplifying a sum/diff. of two univariate
More informationSignificant Figures & Scientific Notation
Significant Figures & Scientific Notation Measurements are important in science (particularly chemistry!) Quantity that contains both a number and a unit Must be able to say how correct a measurement is
More informationName Date. FINAL EXAM STUDY GUIDE Pre-Algebra Course 3
Name Date FINAL EXAM STUDY GUIDE Pre-Algebra Course 3 The following is an outline of key elements that should have been mastered during the course of the year (Grade 8 Green Book Course 3). Use it wisely
More informationSection 7.6 Graphs of the Sine and Cosine Functions
Section 7.6 Graphs of the Sine and Cosine Functions We are going to learn how to graph the sine and cosine functions on the xy-plane. Just like with any other function, it is easy to do by plotting points.
More informationUnit 1 Lesson 4 Representing Data. Copyright Houghton Mifflin Harcourt Publishing Company
Florida Benchmarks SC.6.N.1.1 Define a problem from the sixth grade curriculum, use appropriate reference materials to support scientific understanding, plan and carry out scientific investigation of various
More informationPART I - Fundamentals of Parallel Computing
PART I - Fundamentals of Parallel Computing Objectives What is scientific computing? The need for more computing power The need for parallel computing and parallel programs 1 What is scientific computing?
More informationPRE-ALGEBRA PREP. Textbook: The University of Chicago School Mathematics Project. Transition Mathematics, Second Edition, Prentice-Hall, Inc., 2002.
PRE-ALGEBRA PREP Textbook: The University of Chicago School Mathematics Project. Transition Mathematics, Second Edition, Prentice-Hall, Inc., 2002. Course Description: The students entering prep year have
More informationYear 7 Set 1 : Unit 1 : Number 1. Learning Objectives: Level 5
Year 7 Set 1 : Unit 1 : Number 1 I can place decimals in order of size I can place negative numbers in order of size I can add and subtract negative numbers I can set out and do addition, subtraction,
More informationRELATIONAL AND LOGICAL OPERATORS
Contents RELATIONAL AND LOGICAL OPERATORS... Relational Operators... Logical Operators... Using Relational and Logical Operators with Scalars... 2 Using Relational Operators with Numerical Arrays... 5
More informationMAT 1033C -- Intermediate Algebra -- Lial Chapter 8 -- Roots and Radicals Practice for the Exam (Kincade)
MAT 0C -- Intermediate Algebra -- Lial Chapter 8 -- Roots and Radicals Practice for the Exam (Kincade) Name Date MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers
More informationApplications of Integration. Copyright Cengage Learning. All rights reserved.
Applications of Integration Copyright Cengage Learning. All rights reserved. Volume: The Disk Method Copyright Cengage Learning. All rights reserved. Objectives Find the volume of a solid of revolution
More informationThe Typed Racket Guide
The Typed Racket Guide Version 5.3.6 Sam Tobin-Hochstadt and Vincent St-Amour August 9, 2013 Typed Racket is a family of languages, each of which enforce
More informationNew Mexico Tech Hyd 510
Numerics Motivation Modeling process (JLW) To construct a model we assemble and synthesize data and other information to formulate a conceptual model of the situation. The model is conditioned on the science
More informationLesson 4: Numerical Computations; Newton's method
Lesson 4: Numerical Computations; Newton's method restart; Catastrophic cancellation in the quadratic formula One case where roundoff error can be severe is if you subtract two numbers that are very close
More informationComputational Economics and Finance
Computational Economics and Finance Part I: Elementary Concepts of Numerical Analysis Spring 2016 Outline Computer arithmetic Error analysis: Sources of error Error propagation Controlling the error Rates
More informationErrors in Computation
Theory of Errors Content Errors in computation Absolute Error Relative Error Roundoff Errors Truncation Errors Floating Point Numbers Normalized Floating Point Numbers Roundoff Error in Floating Point
More informationTypes and Type Inference
CS 242 2012 Types and Type Inference Notes modified from John Mitchell and Kathleen Fisher Reading: Concepts in Programming Languages, Revised Chapter 6 - handout on Web!! Outline General discussion of
More informationProgramming Project #2: Solving Quadratic Equations Date Due: Monday 25 September 2017
CISC 5300 Programming in C++ Fall, 2017 Programming Project #2: Solving Quadratic Equations Date Due: Monday 25 September 2017 Write a program that prompts the user to enter the coefficients of a quadratic
More informationProgramming Language Concepts: Lecture 14
Programming Language Concepts: Lecture 14 Madhavan Mukund Chennai Mathematical Institute madhavan@cmi.ac.in http://www.cmi.ac.in/~madhavan/courses/pl2009 PLC 2009, Lecture 14, 11 March 2009 Function programming
More informationIntroduction to MATLAB
Introduction to MATLAB The Desktop When you start MATLAB, the desktop appears, containing tools (graphical user interfaces) for managing files, variables, and applications associated with MATLAB. The following
More informationMATHEMATICS DEPARTMENT COURSE OUTLINE TERM 1/2/3 YEAR 7
MATHEMATICS DEPARTMENT COURSE OUTLINE 2016-17 TERM 1/2/3 YEAR 7 Week Topic YEAR 7- Mathematics Term 1 plan 2016-2017 Learning outcomes 1/2 Numbers and the number system Recall prime numbers up to 50 Know
More informationStating the obvious, people and computers do not speak the same language.
3.4 SYSTEM SOFTWARE 3.4.3 TRANSLATION SOFTWARE INTRODUCTION Stating the obvious, people and computers do not speak the same language. People have to write programs in order to instruct a computer what
More informationAppendix B: Using Graphical Analysis
Appendix B: Using Graphical Analysis Graphical Analysis (GA) is a program by Vernier Software. This program is loaded on all of the Physics 170A computers as well as all of the regular Physics 170 computers.
More information4.7 Approximate Integration
4.7 Approximate Integration Some anti-derivatives are difficult to impossible to find. For example, 1 0 e x2 dx or 1 1 1 + x3 dx We came across this situation back in calculus I when we introduced the
More informationSection a) f(x-3)+4 = (x 3) the (-3) in the parenthesis moves right 3, the +4 moves up 4
Section 4.3 1a) f(x-3)+4 = (x 3) 2 + 4 the (-3) in the parenthesis moves right 3, the +4 moves up 4 Answer 1a: f(x-3)+4 = (x 3) 2 + 4 The graph has the same shape as f(x) = x 2, except it is shifted right
More informationThe mesh-current method
The mesh-current method Equivalent resistance Voltage / current dividers Source transformations Node voltages Mesh currents Superposition Mirror image of the node-voltage method. Define mesh currents flowing
More informationCoefficient Constant Equivalent expressions Equation. 3 A mathematical sentence containing an equal sign
8.4.0 Lesson Date Algebra Vocabulary and Generating Equivalent s Student Objectives I can identify how many terms an expression has and what the coefficients, constants, and like terms of that expression
More informationTechnology Use Guidelines
Technology Use Guidelines 2018 2019 STAAR Calculator Policy Specific calculators are required for students taking STAAR grade 8 mathematics graphing calculator STAAR grade 8 science calculator with basic
More informationMathematics. Jaehyun Park. CS 97SI Stanford University. June 29, 2015
Mathematics Jaehyun Park CS 97SI Stanford University June 29, 2015 Outline Algebra Number Theory Combinatorics Geometry Algebra 2 Sum of Powers n k=1 k 3 k 2 = 1 n(n + 1)(2n + 1) 6 = ( k ) 2 = ( 1 2 n(n
More informationMathematics Scope & Sequence Algebra I
Mathematics Scope & Sequence 2016-17 Algebra I Revised: June 20, 2016 First Grading Period (24 ) Readiness Standard(s) Solving Equations and Inequalities A.5A solve linear equations in one variable, including
More informationCecil Jones Academy Mathematics Fundamentals
Year 10 Fundamentals Core Knowledge Unit 1 Unit 2 Estimate with powers and roots Calculate with powers and roots Explore the impact of rounding Investigate similar triangles Explore trigonometry in right-angled
More informationIntroduction to Computer Programming in Python Dr. William C. Bulko. Data Types
Introduction to Computer Programming in Python Dr William C Bulko Data Types 2017 What is a data type? A data type is the kind of value represented by a constant or stored by a variable So far, you have
More informationGraphics calculator instructions
Graphics calculator instructions Contents: A B C D E F G Basic calculations Basic functions Secondary function and alpha keys Memory Lists Statistical graphs Working with functions 10 GRAPHICS CALCULATOR
More informationUnit Maps: Grade 7 Math
Rational Number Representations and Operations 7.4 Number and operations. The student adds, subtracts, multiplies, and divides rationale numbers while solving problems and justifying solutions. Solving
More informationIntegration. Edexcel GCE. Core Mathematics C4
Edexcel GCE Core Mathematics C Integration Materials required for examination Mathematical Formulae (Green) Items included with question papers Nil Advice to Candidates You must ensure that your answers
More informationDay #1. Determining an exponential function from a table Ex #1: Write an exponential function to model the given data.
Algebra I Name Unit #2: Sequences & Exponential Functions Lesson #7: Determining an Exponential Function from a Table or Graph Period Date Day #1 Ok, so we spent a lot of time focusing on exponential growth
More informationSOLVING the MYSTERY of the TEOTIHUACAN GRIDS ANGLE [15.5], {first posted Hidden Mission Forum [Not Only 19.5] thread Feb 2008.}
SOLVING the MYSTERY of the TEOTIHUACAN GRIDS ANGLE [15.5], {first posted Hidden Mission Forum [Not Only 19.5] thread Feb 2008.} The city of Teotihuacan is intricately laid out in distinct grid patterns,
More informationChapter 2: Measurement and Problem Solving
Chapter 2: Measurement and Problem Solving Determine which digits in a number are significant. Round numbers to the correct number of significant figures. Determine the correct number of significant figures
More informationLab copy. Do not remove! Mathematics 152 Spring 1999 Notes on the course calculator. 1. The calculator VC. The web page
Mathematics 152 Spring 1999 Notes on the course calculator 1. The calculator VC The web page http://gamba.math.ubc.ca/coursedoc/math152/docs/ca.html contains a generic version of the calculator VC and
More information