represent = as a finite deimal" either in base 0 or in base. We an imagine that the omputer first omputes the mathematial = then rounds the result to

Size: px
Start display at page:

Download "represent = as a finite deimal" either in base 0 or in base. We an imagine that the omputer first omputes the mathematial = then rounds the result to"

Transcription

1 Sientifi Computing Chapter I Computer Arithmeti Jonathan Goodman Courant Institute of Mathemaial Sienes Last revised January, 00 Introdution One of the many soures of error in sientifi omputing is inexat omputer arithmeti, whih is alled roundoff error". Roundoff error is inevitable but its onsequenes vary. Some omputations yield nearly exat results, while others give answers that are ompletely wrong. This is true even for problems that involve no other approximations. For example, the gaussian elimination algorithm for solving systems of linear equations would give the exat solution if all the omputations were performed exatly. When these omputations are done in finite preision floating point arithmeti, we might or might not get something lose to the right answer. Suppose your omputed answer is ompletely wrong when a omputation without roundoff would be exatly right. There are three possible situations. Distinguishing these is one of the most important lessions of the ourse. The first guess would be that your program has a bug. You an test for this by finding an instane of your problem that is small enough and easy enough for roundoff to be a less likely exuse. Assuming the oding is orret, the problem may be so ill onditioned" that no algorithm ould reasonably be expeted to work. The last possibility is that there is an aurate method for getting the answer in floating point, just not yours. In this ase, your method is alled unstable". You an analyse an unstable algorithm and try to find a stable variant. However, if your problem is ill onditioned, you took a wrong path long before the solution algorithm design stage. A large lass of problems ranging from sophistiated inverse problems" to simple polynomial interpolation are ill onditioned. Roundoff and anellation If x is a floating point variable (type float or double in C) and we say, for example, x=/, then x will not get the value exatly =. It is impossible to

2 represent = as a finite deimal" either in base 0 or in base. We an imagine that the omputer first omputes the mathematial = then rounds the result to a nearby number with a finite omputer representation. Most arithmeti operations involving floating point numbers require roundoff. As a result, many properties of arithmeti, suh as assoiativity of addition ((x + y)+ z = x +(y + z)), and distributivity (x (y + z) =x y + x z), do not hold exatly when done in floating point. We must be areful not to write odes that depend on exat arithmeti to work orretly. For example, suppose we want to divide the interval [0;T] into n equal parts. The following ode will probably be an infinite loop: float deltat, t; deltat = T/n; for ( t = deltat; t!= T; t+= deltat )...} If we replae the ontinuation riterion t!= T by t <= T, we will get either n or n + trips through the loop, depending on the sign of the roundoff error. To get the orret result, use exat integer arithmeti suh as this: float deltat, t; int i; deltat = T/n; t = (float) 0; for ( i = 0; i < n; i++) t+=deltat;...} In disussing the aumulation of roundoff errors, we suppose x is a real number that would result from a sequene of omputations, and ~x is what the omputer produes in floating point arithmeti. To start, we onsider the ase where ~x is simply the result of rounding" x, that is, finding the omputer floating point number losest to x. This rounding error, x ~x, is generally proportional to x. The small onstant of proportionality haraterizes the auray of the arithmeti. For example, if we use deimal arithmeti and keep 4 signifiant deimals, then ß = : would round to ~ß = :4. The rounding error is about The mass of a proton, in grams, is m ß : This number would round to ~m = :67 0 4, for a roundoff error of ~m m ß 0 8. It might seem that the rounding error for m is muh less than for ß. However, in relative terms they are about the same: fi fi fi fi fi ß ~ß fi fi m fi fi fi ß fi ο ~m fi fi fi fi m fi ο 0 4 ; where we write a ο b to mean that a and b have the same order of magnitude. It is onvenient to represent the above rounding error by writing ~x =(+ffl)x : () It might be more orret to write m =: grams. In the omputer we need to give a pure number. It is up to the programmer to remember that m is the number of grams.

3 We say that ffl mah is the mahine preision" if the rounding error in () satisfies jfflj»ffl mah ; () as long as x is in the range of normalized numbers" where floating point arithmeti usually takes plae. Atually, the mahine preision", ffl mah, is no longer a funtion of the mahine sine most mahines use IEEE arithmeti. It does depend on whether you use single or double preision. Sine the relative distane between omputer floating point numbers is more or less uniform aross the normal range, we mayaswell take x =. Thus, is possible to haraterize ffl mah as the largest ffl so that +ffl rounds to. This is often taken as the definition of ffl mah. Our model of omputer arithmeti is that all error omes from rounding error. The result of any arithmeti operation should be the exat result, orretly rounded". Suppose, for example, some plae in a omputation we have z = x + y. At that point, we have ~x and ~y. First we perform the mathematial addition to get the exat z =~x +~y. Then we round, finding the losest floating point number to z : ~z =(+ffl r )z, where ffl r satisfies () beause it orresponds to a single rounding operation. Rounding error an aumulate in a omputation. If we have ~x =(+ffl x )x and ~y =(+ffl y )y, then ~z =(+ffl z )z, where ffl z ß ffl r + xffl x + yffl y z : () In this way, roundoff error an aumulate during a long omputation and lead to errors muh larger than roundoff. If there are many steps in the omputation, then we mayhave jffl z j >> ffl mah, and it is all but impossible that jffl z j << ffl mah. Even the aumulation of roundoff error would be usually harmless but for anellation", the inrease in error that omes from subtrating two positive (or negative) numbers. A world with no negative numbers or subtration would have more aurate omputer arithmeti than ours. Subtration magnifies error beause we measure error in relative terms rather than absolute terms. If x and y are positive, then () shows that jffl z j»ffl mah + jffl x j + jffl y j. Error aumulates but it not amplified. On the other hand, if x and y have opposite signs but nearly equal magnitudes, then we mayhave jzj >> jxj + jyj and we an have jffl z j >> ffl mah + jffl x j + jffl y j ; beause the denominator in () is muh smaller than x or y. The error has not grown muh in absolute terms: jz ~zj»ffl mah jzj + jx ~xj + jx ~xj : The error has grown in relative terms beause the answer has shrunk. This is beause of the auray of omputer arithmeti. It would take avery long omputation build up enough error to overwhelm the answer.

4 Error amplifiation through anellation does not have to happen all at one. It an build up through a long omputation with many subtrations. For example, start with the geometri series We denote the tails of this series d k = =+ + k = k + + : k+ + : Clearly d k+ = d k. k Suppose we start with d 0 = and subtrat the right hand terms kone by one, giving = ; 4 = ; 8 9 = ; et. If we do this on the omputer, we quikly ome to a number that is 00% wrong even though the two terms on the right side of the subtrations differ by a fator of always. The C program below illustrates these points. #inlude <stdio.h> #define MAXN 00 #define PRINTFREQUENCY 0 int main() int n; double twoby, x, dapprox, dbetter, diff, rdiff; twoby = ( (double) )/( (double) ); dapprox = (double) ; dbetter = (double) ; x = (double) ; for( n=0; n < MAXN; n++) dapprox -= x; dbetter *= twoby; x *= twoby; diff = dbetter - dapprox; rdiff = diff/dbetter; if( n % PRINTFREQUENCY == 0 ) printf("n = %d, d = %0.e,", n, dbetter); printf(" abs diff = %.4e,", diff); 4

5 printf(" rel diff = %0.e n", rdiff); } } return 0; } The output is n = 0, d =.000e+00, abs diff = e+00, rel diff = 0.000e+00 n = 0, d =.468e-0, abs diff = e-6, rel diff = -9.40e-5 n = 0, d = 6.05e-04, abs diff = e-6, rel diff = -5.50e- n = 0, d =.04e-05, abs diff = e-6, rel diff = -.75e- n = 40, d =.809e-07, abs diff = e-6, rel diff = -.8e-09 n = 50, d =.7e-09, abs diff = e-6, rel diff = -.056e-07 n = 60, d = 5.49e-, abs diff = e-6, rel diff = e-06 n = 70, d = 9.4e-, abs diff = e-6, rel diff = -.50e-04 n = 80, d =.66e-4, abs diff = e-6, rel diff = -.04e-0 n = 90, d =.87e-6, abs diff = e-6, rel diff = -.67e+00 The output illustrates this point. The absolute error is nearly onstant after the first ten steps but the relative error inreases exponentially as the answer shrinks. Stability and onditioning The onditioning of a problem refers to how sensitive the answer is to small hanges in the data. For this general disussion, we write A(x) for some omputed quantity, the answer", that depends on data, x. The sensitivity of A with respet to x This means that if x is a small hange in x, and is the resulting hange in A, then x : As explained in the previous setion, it is often more useful to alulate relative hanges. The ratio between the relative hange in A and the relative hange in x is», the ondition number: A From this, a formula for the ondition number is A ß» x x : (4)» A : (5) The ondition number is a dimensionless measure of sensitivity. It is the same, for example, when A is the number of seonds or the number of hours. The ondition number limits the auray whith shih A an be alulated in floating point arithmeti. The first thing we do in any alulation is to round 5

6 the data, x, to the nearest floating point number, ausing an error on the order of the mahine preision fi fi fifi x fi fi fi x fi < ο ffl mah : Therefore, the error in A will be at least fi fi fi A fi fi fi fi A fi > ο»ffl mah : We will enounter problems in later hapters whose ondition numbers are so large that A is essentially unomputable even in double preision arithmeti. Here is a simple example of an ill onditioned problem. Suppose x =(x ;x ) t is a two dimensional vetor (the t supersript means transpose so that x is a olumn vetor). Let P = ψ 4 Consider the iteration proess x k+ = Px k, starting with some x 0. The problem is to use the two numbers x k to reonstrut the two numbers x 0. We an understand what happens here using the eigenvalues and eigenvetors of P. It is easy to hek that P = 4! and P This gives the eigenvalues ( =, = 4 x = y + y then, (letting y k orrespond to the iterate x k ) so : = 4 y k+ = y k and y k+ = 4 yk : y k = y 0 and y k = and the eigenvetors. If we write ; k 4 y 0 : This means that the iteration proess rapidly removes the information about y while preserving y. If we perturb x k by roundoff error in eah omponent, that will perturb two omponents of y k by about the same amount. However, the y perturbation will be amplified by a fator of ( 4) k. For k = 5 in single preision or k = 50 in double preision, this will lead to omplete loss of auray. The underlying reason it is impossible to reonstrut y 0 from x 50 is that the information is not there. The iteration proess has essentially removed all trae of y. : 6

7 Even if A is well ondtioned", i.e.» is not too large, we may still get the wrong answer in a omputation, if we use an unstable" algorithm. The stability of a omputational algorithm is a measure of the relative error amplifiation beyond the minimum (4) implied by the ondition number. For example, in the program above, the number d is omputed in two ways, by repeated subtration (the variable dapprox) and through repeated multipliation by = (the variable dbetter). It is lear that dbetter is orret to within a fator of 00 of ffl mah. On the other hand, the relative error in dapprox grows exponentially beause d dereases exponentially. Note that the absolute differene between d and dapprox essentially stops hanging after the first few steps. In this ase, repeated subtration is an unstable way to ompute d. 4 The IEEE floating point standard The IEEE floating point standard is a set of rules issued by the IEEE (Institute of Eletrial and Eletronis Engineers) on omputer representation and proessing of floating point numbers. Today, most omputers laim to be IEEE ompliant but many ut orners in what (they onsider to be) minor details. The standard is urrently being enlarged to speify some details left open in the original standard, mostly on how programmers interat with flags and traps. The standard has four main goals: () To make floating point arithmeti as aurate as possible. () To produe sensible outomes in exeptional situations. () To standardize floating point operations aross omputers. (4) To give the programmer ontrol over exeption handling. The IEEE standard speifies exatly what floating point numbers are and how they are to be represented in hardware. The most basi unit of information that a omputer stores is a bit, a variable whose value may be either 0 or. Bits are organized into groups of 8 alled bytes. The most ommon unit of omputer number information is the 4 byte ( bit) word. For higher auray this is doubled to 8 bytes or 64 bits. There are possible values for a bit, there are 8 = 56 possible values for a byte, and there are different 4byte words, about 4: billion. A typial omputer should take less than an hour to list all 4: billion bit words. There are two omputer data types that represent numbers. A fixed point number has type int in C and type integer in FORTRAN. A floating point number has type float in C and real in FORTRAN. In most C ompilers, a float by by default has 8 bytes instead of 4. Integer arithmeti is very simple. There are ß bit integers filling the range from about 0 9 to 0 9. Addition, subtration, and multipliation are done exatly whenever the answer is within this range. Most omputers will do something unpreditable when the answer is out of range 7

8 (overflow). For sientifi omputing, fixed point (integer) arithmeti has two drawbaks. One is that there is no representation for numbers that are not integers. Equally important is the small range of values. The number of dollars in the US national debt, several trillion (0 ), annot be represented as a bit integer but is easy to approximate in bit floating point. A floating point (or real") number is a omputer version of the exponential (or sientifi") notation used on alulator displays. Consider the example expression: :49E 5 whih isone way a alulator ould display the number : This expression onsists of a sign bit, s =, a mantissa, m = 49 and an exponent, e = 5. The expression s:mee orresponds to the number s :m 0 e. The IEEE format replaes the base 0 with base, and makes a few other hanges. When a bit word is interpreted as a floating point number, the first bit is the sign bit, s = ±. The next 8 bits form the exponent", e, and the remaining bits determine the fration", f. There are two possible signs, 56 possible exponents (ranging from 0 to 55), and ß 8:4 million possible frations. Normally a floating point number has the value x = ± e 7 (:f) ; where f is base and the notation (:f) means that the expression :f is interpreted in base. Note that the mantissa is :f rather than just the frational part, f. In base anynumber (exept 0) an be normalized so that the mantissa has the form :f. There is no need to store the :" expliitly. For example, the number :75 0 = 57 an be written 75 = = = (+(:0) +(:000) +(:0000) ) = (:00) : Thus, the representation of this number would have sign s = +, exponent e 7 = so that e = 8 = (00000), and fration f = ( ). The entire bit string orresponding to :75 0 then is: z} s z } e z } f : The exeptional ases e = 0 (whih would orrespond to 7 ) and e = 55 (whih would orrespond to 8 ) have omplex and arefully engineered interpretations that make the IEEE standard distintive. If e = 0, the value is x = ± 6 0:f : This feature is alled gradual underflow". ( Underflow" is the situation in whih the result of an operation is not zero but is loser to zero than any 8

9 floating point number.) The orresponding numbers are alled denormalized". Gradual underflow has the onsequene that two floating point numbers are equal, x = y, if and only if subtrating one from the other gives exatly zero. The use of denormalized (or subnormal") numbers makes sense when you onsider the spaing between floating point numbers. If we exlude denormalized numbers then the smallest positive floating pont number (in single preision) is a = 6 (orresponding to e = and f =00 00 ( zeros)) but the next positive floating point number larger than a is b, whih also has e = but now has f =00 0 ( zeros and a ). Beause of the impliit leading in :f, the distane between b and a is times smaller than the distane between a and zero. That is, without gradual underflow, there is a large and unneessary gap between 0 and the nearest nonzero floating point number. The other extreme ase, e = 55, has two subases, inf (for infinity) if f =0 and NaN (for Not a Number) if f 6= 0. Both C and FORTRAN print inf" and NaN" when you printoutavariable in floating point format that has one of these values. The omputer produes inf if the result of an operation is larger than the largest floating point number, in ases suh asx*x*x*x when x =5: 0 5, or exp(x) when x = 04, or /x if x = ±0. (Atually = +0 = +inf and = 0 = -inf). Other invalid operations suh as sqrt(-.), log(-4.), and inf/inf, produe NaN. It is planned that f will ontain information about how or where in the program the NaN was reated but this is not standardized yet. It might be worthwhile to look in the hardware or arithmeti manual of the omputer you are using. Exatly what happens when a floating point exeption, the generation of an inf or a NaN, ours is supposed to be under software ontrol. There is supposed to be a flag (an internal omputer status bit with values 0 or ) that the program an set. If the flag is on, the exeption will ause a program interrupt (the program will halt there and print an error message), otherwise, the omputer will just give the inf or NaN as the result of the operation and ontinue. The default in most situations is the worst of both ations. The omputer generates an interrupt, whih has enormous omputational overhead (see hapter??), then it puts in the inf or NaN without stopping to print an error message. In pratie, it may be hard for the programmer to figure out how to set the arithmeti flags and other arithmeti defaults. The floating point standard speifies that all arithmeti operations should be a aurate as possible within the onstraints of finite preision arithmeti. The result of arithmeti operations is to be the exat result orretly rounded". This means that you an get the omputed result in two steps. First interpret the operand(s) as mathematial real number(s) and perform the mathematial operation exatly. This usually gives a result that annot be represented exatly in IEEE format. The seond step is to round" this mathematial answer, that is, replae it with the IEEE number losest to it. Ties (two IEEE numbers the same distane from the mathematial answer) are broken in some way (e.g. In keeping with its mission to maximize inompatibility, Mirosoft has hanged the names inf and NaN to something similar but different. 9

10 round to nearest even). Any operation involving a NaN produes another NaN. Operations with inf are ommon sense: inf + finite = inf, inf=inf = NaN, finite=inf =0:, inf inf = NaN. From the above, it is lear that the auray of floating point operations is determined by the size of rounding error. This rounding error is determined by the distane between neighboring floating point numbers. Exept for denormalized numbers, neighboring floating numbers differ by one bit in the last bit of the fration, f. This is one part in ß 0 7 in single preision. Note that this is relative error, rather than absolute error. If the result is on the order of 0 then the roundoff error will be on the order of 0 5. This is sometimes expressed by saying that z = x + y produes (x + y)( + ffl) where jfflj»ffl mah, and ffl mah, the mahine epsilon" is on the order of 0 7 in single preision. Double preision IEEE arithmeti uses 8 bytes (64 bits) rather than 4 bytes. There is one sign bit, exponent bits, and 5 fration bits. Therefore the double preision floating point preision is determined by ffl mah = 5 ß That is, double preision arithmeti gives roughly 5 deimal digits of auray instead of 7 for single preision. There are possible exponents in double preision, ranging from 0 to 0. The largest double preision number is of the order of 0 ß Not only is double preision arithmeti more aurate than single preision, but the range of numbers is far greater. Many features of IEEE arithmeti are illustrated in the program below. The reader would do well do do some of this kind of experimentation for herself or himself. The first setion illustrates various how inf and NaN work. Note that e 04 = inf in single preision but not in double preision beause the range of values is larger in double preision. The next setion shows that IEEE addition is ommutative. This is a onsequene of the exat answer orretly rounded" proedure. The exat answer is ommutative so either way the omputer have the same number to round. This ommutativity does not apply to triples of numbers beause the omputer only adds two numbers at a time. The ompiler turns the expression x + y + z into (x + y) + z. It adds x to y, rounds the answer and adds the result to z. The expression z + x + y auses z + x to be rounded and added to y, whih gives a (slightly) different result. Then omes an illustration of type onversion. Doing the integer division i/j gives = whih is rounded to the integer value, 0, and then onverted to floating point format. When y is omputed, the onversion to floating point format is done before the division. Finally there is another example in whih two variables might be expeted to be equal but aren't beause of inexat arithmeti. It is almost always wrong to ask whether two floating point numbers are equal. Last is a serendipitous example of getting exatly the right answer by aident. Don't ount on this! 0

11 A program that explores IEEE arithmeti Some double preision (8 byte or 64 bit) variables double preision xd, yd C programmers note that other variables are delared automatially and have default types. Take an exponential that is out of range x = 04. y = exp(x) write(6,0) x,y 0 format(' The exponential of ',e.4,' is ', e.4) Divide a normal number by infinity z = x/y write(6,40) x, y, z 40 format(' ',e.4,' divided by ',e.4,' gives ',e.4) Divide infinity by infinity w = y z = w/y write(6,60) w, y, z 60 format(' ',e.4,' divided by ',e.4,' gives ',e.4) Take the square root of a negative number z = sqrt( -. ) write(6,80) z 80 format(' The square root of -. is ',e.4) Add NaN to a normal number w = x + z write(6,00) x, z, w 00 format(' ',e.4,' plus ', e.4,' gives ',e.4) Take the same exponential in double preision xd = 04.d0

12 yd = exp( xd ) write(6,0) xd, yd 0 format(' The double preision exponential of ',e.4,' is ',e.4) Trunate a very large double preision number y = yd write(6,40) yd, y 40 format(' The single preision version of ',e.4,' is ',e.4) Explore the arithmeti, does addition ommute? x = sin(.) y = 0.*sin(.) z = 00.*sin(.) s = x + y s = y + x s = x + z s4 = z + x if ( ( s.eq. s ).and. ( s.eq. s4 ) ) then write (6,60) x, y, z 60 format(' Adding pairs of ',e.4,', ',e.4,', and ',e.4,. ' ommutes') else write (6,80) x, y, z 80 format(' Adding pairs of ',e.4,', ',e.4,', and ',e.4,. ' does not ommute') endif s = x + y + z s = y + z + x s = z + x + y if ( ( s.eq. s ).and. ( s.eq. s ) ) then write (6,00) x, y, z 00 format(' Adding triples of ',e.4,', ',e.4,', and ',e.4,. ' ommutes') else write (6,0) x, y, z 0 format(' Adding triples of ',e.4,', ',e.4,', and ',e.4,. ' does not ommute') endif The result of an operation depends on the type of the operand i = j =

13 x = i/j y = real(i)/real(j) write(6,40) i,j,x,y 40 format(' Dividing ',i4,' by ',i4,' gives ',e.4,. ' without onversion',/,. ' and ',e.4,. ' with onversion') Don't expet other arithmeti identities to be exatly true. x = z / y = x + x + x + x + x + x + x + x + x + x + x x = z / 5. w = 5*x if ( y.eq. z ) then write(6,60) z 60 format(' Divided ',e.5,' by and got it bak ',. 'by addition!!!') else write(6,80) z 80 format(' Divided ',e.5,' by and did not get it bak ',. 'by addition') endif if ( w.eq. z ) then write(6,00) z 00 format(' Divided ',e.5,' by 5 and got it bak ',. 'by multipliation!!!') else write(6,0) z 0 format(' Divided ',e.5,' by 5 and did not get it bak ',. 'by multipliation') endif stop end This program produes the output The exponential of 0.040E+0 is Inf 0.040E+0 divided by Inf gives E+00 Inf divided by Inf gives NaN The square root of -. is NaN 0.040E+0 plus NaN gives NaN The double preision exponential of 0.040E+0 is 0.945E+89 The single preision version of 0.945E+89 is Inf Adding pairs of 0.845E+00, 0.909E+0, and 0.4E+0 ommutes

14 Adding triples of 0.845E+00, 0.909E+0, and 0.4E+0 does not ommute Dividing by gives E+00 without onversion and E+00 with onversion Divided 0.4E+0 by and did not get it bak by addition Divided 0.4E+0 by 5 and got it bak by multipliation!!! Note: the following IEEE floating-point arithmeti exeptions ourred and were never leared; see ieee_flags(m): Inexat; Overflow; Invalid Operand; Note: IEEE Infinities were written to ASCII strings or output files; see eonvert(). Note: IEEE NaNs were written to ASCII strings or output files; see eonvert(). Sun's implementation of IEEE arithmeti is disussed in the Numerial Computation Guide. 4

Background/Review on Numbers and Computers (lecture)

Background/Review on Numbers and Computers (lecture) Bakground/Review on Numbers and Computers (leture) ICS312 Mahine-Level and Systems Programming Henri Casanova (henri@hawaii.edu) Numbers and Computers Throughout this ourse we will use binary and hexadeimal

More information

Finding the Equation of a Straight Line

Finding the Equation of a Straight Line Finding the Equation of a Straight Line You should have, before now, ome aross the equation of a straight line, perhaps at shool. Engineers use this equation to help determine how one quantity is related

More information

13.1 Numerical Evaluation of Integrals Over One Dimension

13.1 Numerical Evaluation of Integrals Over One Dimension 13.1 Numerial Evaluation of Integrals Over One Dimension A. Purpose This olletion of subprograms estimates the value of the integral b a f(x) dx where the integrand f(x) and the limits a and b are supplied

More information

Review (Law of sines and cosine) cosines)

Review (Law of sines and cosine) cosines) Date:03/7,8/01 Review 6.1-6. Objetive: Apply the onept to use the law of the sines and osines to solve oblique triangles Apply the onept to find areas using the law of sines and osines Agenda: Bell ringer

More information

Learning Convention Propagation in BeerAdvocate Reviews from a etwork Perspective. Abstract

Learning Convention Propagation in BeerAdvocate Reviews from a etwork Perspective. Abstract CS 9 Projet Final Report: Learning Convention Propagation in BeerAdvoate Reviews from a etwork Perspetive Abstrat We look at the way onventions propagate between reviews on the BeerAdvoate dataset, and

More information

Outline: Software Design

Outline: Software Design Outline: Software Design. Goals History of software design ideas Design priniples Design methods Life belt or leg iron? (Budgen) Copyright Nany Leveson, Sept. 1999 A Little History... At first, struggling

More information

Year 11 GCSE Revision - Re-visit work

Year 11 GCSE Revision - Re-visit work Week beginning 6 th 13 th 20 th HALF TERM 27th Topis for revision Fators, multiples and primes Indies Frations, Perentages, Deimals Rounding 6 th Marh Ratio Year 11 GCSE Revision - Re-visit work Understand

More information

UCSB Math TI-85 Tutorials: Basics

UCSB Math TI-85 Tutorials: Basics 3 UCSB Math TI-85 Tutorials: Basis If your alulator sreen doesn t show anything, try adjusting the ontrast aording to the instrutions on page 3, or page I-3, of the alulator manual You should read the

More information

Chapter 2: Introduction to Maple V

Chapter 2: Introduction to Maple V Chapter 2: Introdution to Maple V 2-1 Working with Maple Worksheets Try It! (p. 15) Start a Maple session with an empty worksheet. The name of the worksheet should be Untitled (1). Use one of the standard

More information

A DYNAMIC ACCESS CONTROL WITH BINARY KEY-PAIR

A DYNAMIC ACCESS CONTROL WITH BINARY KEY-PAIR Malaysian Journal of Computer Siene, Vol 10 No 1, June 1997, pp 36-41 A DYNAMIC ACCESS CONTROL WITH BINARY KEY-PAIR Md Rafiqul Islam, Harihodin Selamat and Mohd Noor Md Sap Faulty of Computer Siene and

More information

And, the (low-pass) Butterworth filter of order m is given in the frequency domain by

And, the (low-pass) Butterworth filter of order m is given in the frequency domain by Problem Set no.3.a) The ideal low-pass filter is given in the frequeny domain by B ideal ( f ), f f; =, f > f. () And, the (low-pass) Butterworth filter of order m is given in the frequeny domain by B

More information

Drawing lines. Naïve line drawing algorithm. drawpixel(x, round(y)); double dy = y1 - y0; double dx = x1 - x0; double m = dy / dx; double y = y0;

Drawing lines. Naïve line drawing algorithm. drawpixel(x, round(y)); double dy = y1 - y0; double dx = x1 - x0; double m = dy / dx; double y = y0; Naïve line drawing algorithm // Connet to grid points(x0,y0) and // (x1,y1) by a line. void drawline(int x0, int y0, int x1, int y1) { int x; double dy = y1 - y0; double dx = x1 - x0; double m = dy / dx;

More information

The Mathematics of Simple Ultrasonic 2-Dimensional Sensing

The Mathematics of Simple Ultrasonic 2-Dimensional Sensing The Mathematis of Simple Ultrasoni -Dimensional Sensing President, Bitstream Tehnology The Mathematis of Simple Ultrasoni -Dimensional Sensing Introdution Our ompany, Bitstream Tehnology, has been developing

More information

Complex Rational Expressions

Complex Rational Expressions Comple ational Epressions What is a Comple ational Epression? A omple rational epression is similar to a omple fration whih has one or more frations in its numerator, denominator, or both The following

More information

Reading Object Code. A Visible/Z Lesson

Reading Object Code. A Visible/Z Lesson Reading Objet Code A Visible/Z Lesson The Idea: When programming in a high-level language, we rarely have to think about the speifi ode that is generated for eah instrution by a ompiler. But as an assembly

More information

Floating-Point Numbers in Digital Computers

Floating-Point Numbers in Digital Computers POLYTECHNIC UNIVERSITY Department of Computer and Information Science Floating-Point Numbers in Digital Computers K. Ming Leung Abstract: We explain how floating-point numbers are represented and stored

More information

2 Computation with Floating-Point Numbers

2 Computation with Floating-Point Numbers 2 Computation with Floating-Point Numbers 2.1 Floating-Point Representation The notion of real numbers in mathematics is convenient for hand computations and formula manipulations. However, real numbers

More information

Introductory Programming, IMM, DTU Systematic Software Test. Software test (afprøvning) Motivation. Structural test and functional test

Introductory Programming, IMM, DTU Systematic Software Test. Software test (afprøvning) Motivation. Structural test and functional test Introdutory Programming, IMM, DTU Systemati Software Test Peter Sestoft a Programs often ontain unintended errors how do you find them? Strutural test Funtional test Notes: Systemati Software Test, http://www.dina.kvl.dk/

More information

1 The Knuth-Morris-Pratt Algorithm

1 The Knuth-Morris-Pratt Algorithm 5-45/65: Design & Analysis of Algorithms September 26, 26 Leture #9: String Mathing last hanged: September 26, 27 There s an entire field dediated to solving problems on strings. The book Algorithms on

More information

2 Computation with Floating-Point Numbers

2 Computation with Floating-Point Numbers 2 Computation with Floating-Point Numbers 2.1 Floating-Point Representation The notion of real numbers in mathematics is convenient for hand computations and formula manipulations. However, real numbers

More information

Define - starting approximation for the parameters (p) - observational data (o) - solution criterion (e.g. number of iterations)

Define - starting approximation for the parameters (p) - observational data (o) - solution criterion (e.g. number of iterations) Global Iterative Solution Distributed proessing of the attitude updating L. Lindegren (21 May 2001) SAG LL 37 Abstrat. The attitude updating algorithm given in GAIA LL 24 (v. 2) is modified to allow distributed

More information

Pipelined Multipliers for Reconfigurable Hardware

Pipelined Multipliers for Reconfigurable Hardware Pipelined Multipliers for Reonfigurable Hardware Mithell J. Myjak and José G. Delgado-Frias Shool of Eletrial Engineering and Computer Siene, Washington State University Pullman, WA 99164-2752 USA {mmyjak,

More information

arxiv: v1 [cs.db] 13 Sep 2017

arxiv: v1 [cs.db] 13 Sep 2017 An effiient lustering algorithm from the measure of loal Gaussian distribution Yuan-Yen Tai (Dated: May 27, 2018) In this paper, I will introdue a fast and novel lustering algorithm based on Gaussian distribution

More information

Floating-point representation

Floating-point representation Lecture 3-4: Floating-point representation and arithmetic Floating-point representation The notion of real numbers in mathematics is convenient for hand computations and formula manipulations. However,

More information

Reading Object Code. A Visible/Z Lesson

Reading Object Code. A Visible/Z Lesson Reading Objet Code A Visible/Z Lesson The Idea: When programming in a high-level language, we rarely have to think about the speifi ode that is generated for eah instrution by a ompiler. But as an assembly

More information

MAT128A: Numerical Analysis Lecture Two: Finite Precision Arithmetic

MAT128A: Numerical Analysis Lecture Two: Finite Precision Arithmetic MAT128A: Numerical Analysis Lecture Two: Finite Precision Arithmetic September 28, 2018 Lecture 1 September 28, 2018 1 / 25 Floating point arithmetic Computers use finite strings of binary digits to represent

More information

Gray Codes for Reflectable Languages

Gray Codes for Reflectable Languages Gray Codes for Refletable Languages Yue Li Joe Sawada Marh 8, 2008 Abstrat We lassify a type of language alled a refletable language. We then develop a generi algorithm that an be used to list all strings

More information

AN INTRODUCTION TO FORTRAN AND NUMERICAL MODELING

AN INTRODUCTION TO FORTRAN AND NUMERICAL MODELING AN INTRODUCTION TO FORTRAN AND NUMERICAL MODELING Dr. L. W. Shwartz Department of Mehanial Engineering University of Delaware September, 2000 INTRODUCTION The first part of this short doument ontains a

More information

with respect to the normal in each medium, respectively. The question is: How are θ

with respect to the normal in each medium, respectively. The question is: How are θ Prof. Raghuveer Parthasarathy University of Oregon Physis 35 Winter 8 3 R EFRACTION When light travels from one medium to another, it may hange diretion. This phenomenon familiar whenever we see the bent

More information

Analysis of input and output configurations for use in four-valued CCD programmable logic arrays

Analysis of input and output configurations for use in four-valued CCD programmable logic arrays nalysis of input and output onfigurations for use in four-valued D programmable logi arrays J.T. utler H.G. Kerkhoff ndexing terms: Logi, iruit theory and design, harge-oupled devies bstrat: s in binary,

More information

MATH STUDENT BOOK. 12th Grade Unit 6

MATH STUDENT BOOK. 12th Grade Unit 6 MATH STUDENT BOOK 12th Grade Unit 6 Unit 6 TRIGONOMETRIC APPLICATIONS MATH 1206 TRIGONOMETRIC APPLICATIONS INTRODUCTION 3 1. TRIGONOMETRY OF OBLIQUE TRIANGLES 5 LAW OF SINES 5 AMBIGUITY AND AREA OF A TRIANGLE

More information

Graph-Based vs Depth-Based Data Representation for Multiview Images

Graph-Based vs Depth-Based Data Representation for Multiview Images Graph-Based vs Depth-Based Data Representation for Multiview Images Thomas Maugey, Antonio Ortega, Pasal Frossard Signal Proessing Laboratory (LTS), Eole Polytehnique Fédérale de Lausanne (EPFL) Email:

More information

Algorithms for External Memory Lecture 6 Graph Algorithms - Weighted List Ranking

Algorithms for External Memory Lecture 6 Graph Algorithms - Weighted List Ranking Algorithms for External Memory Leture 6 Graph Algorithms - Weighted List Ranking Leturer: Nodari Sithinava Sribe: Andi Hellmund, Simon Ohsenreither 1 Introdution & Motivation After talking about I/O-effiient

More information

Triangles. Learning Objectives. Pre-Activity

Triangles. Learning Objectives. Pre-Activity Setion 3.2 Pre-tivity Preparation Triangles Geena needs to make sure that the dek she is building is perfetly square to the brae holding the dek in plae. How an she use geometry to ensure that the boards

More information

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

Most nonzero floating-point numbers are normalized. This means they can be expressed as. x = ±(1 + f) 2 e. 0 f < 1 Floating-Point Arithmetic Numerical Analysis uses floating-point arithmetic, but it is just one tool in numerical computation. There is an impression that floating point arithmetic is unpredictable and

More information

Floating-Point Numbers in Digital Computers

Floating-Point Numbers in Digital Computers POLYTECHNIC UNIVERSITY Department of Computer and Information Science Floating-Point Numbers in Digital Computers K. Ming Leung Abstract: We explain how floating-point numbers are represented and stored

More information

Colouring contact graphs of squares and rectilinear polygons de Berg, M.T.; Markovic, A.; Woeginger, G.

Colouring contact graphs of squares and rectilinear polygons de Berg, M.T.; Markovic, A.; Woeginger, G. Colouring ontat graphs of squares and retilinear polygons de Berg, M.T.; Markovi, A.; Woeginger, G. Published in: nd European Workshop on Computational Geometry (EuroCG 06), 0 Marh - April, Lugano, Switzerland

More information

Divide-and-conquer algorithms 1

Divide-and-conquer algorithms 1 * 1 Multipliation Divide-and-onquer algorithms 1 The mathematiian Gauss one notied that although the produt of two omplex numbers seems to! involve four real-number multipliations it an in fat be done

More information

Calculation of typical running time of a branch-and-bound algorithm for the vertex-cover problem

Calculation of typical running time of a branch-and-bound algorithm for the vertex-cover problem Calulation of typial running time of a branh-and-bound algorithm for the vertex-over problem Joni Pajarinen, Joni.Pajarinen@iki.fi Otober 21, 2007 1 Introdution The vertex-over problem is one of a olletion

More information

PHYS 3437: Computational Methods in Physics, Assignment 2

PHYS 3437: Computational Methods in Physics, Assignment 2 PHYS 3437: Computational Methods in Physis, Assignment 2 Set January 27th due Feb 26th NOTE: This assignment is potentially quite lengthy if you are urrently developing your programming skills. If so,

More information

CleanUp: Improving Quadrilateral Finite Element Meshes

CleanUp: Improving Quadrilateral Finite Element Meshes CleanUp: Improving Quadrilateral Finite Element Meshes Paul Kinney MD-10 ECC P.O. Box 203 Ford Motor Company Dearborn, MI. 8121 (313) 28-1228 pkinney@ford.om Abstrat: Unless an all quadrilateral (quad)

More information

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

Math 340 Fall 2014, Victor Matveev. Binary system, round-off errors, loss of significance, and double precision accuracy. Math 340 Fall 2014, Victor Matveev Binary system, round-off errors, loss of significance, and double precision accuracy. 1. Bits and the binary number system A bit is one digit in a binary representation

More information

Smooth Trajectory Planning Along Bezier Curve for Mobile Robots with Velocity Constraints

Smooth Trajectory Planning Along Bezier Curve for Mobile Robots with Velocity Constraints Smooth Trajetory Planning Along Bezier Curve for Mobile Robots with Veloity Constraints Gil Jin Yang and Byoung Wook Choi Department of Eletrial and Information Engineering Seoul National University of

More information

A Novel Validity Index for Determination of the Optimal Number of Clusters

A Novel Validity Index for Determination of the Optimal Number of Clusters IEICE TRANS. INF. & SYST., VOL.E84 D, NO.2 FEBRUARY 2001 281 LETTER A Novel Validity Index for Determination of the Optimal Number of Clusters Do-Jong KIM, Yong-Woon PARK, and Dong-Jo PARK, Nonmembers

More information

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

AM205: lecture 2. 1 These have been shifted to MD 323 for the rest of the semester. AM205: lecture 2 Luna and Gary will hold a Python tutorial on Wednesday in 60 Oxford Street, Room 330 Assignment 1 will be posted this week Chris will hold office hours on Thursday (1:30pm 3:30pm, Pierce

More information

Floating-Point Arithmetic

Floating-Point Arithmetic Floating-Point Arithmetic Raymond J. Spiteri Lecture Notes for CMPT 898: Numerical Software University of Saskatchewan January 9, 2013 Objectives Floating-point numbers Floating-point arithmetic Analysis

More information

Binary floating point encodings

Binary 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 information

The Happy Ending Problem

The Happy Ending Problem The Happy Ending Problem Neeldhara Misra STATUTORY WARNING This doument is a draft version 1 Introdution The Happy Ending problem first manifested itself on a typial wintery evening in 1933 These evenings

More information

1. The collection of the vowels in the word probability. 2. The collection of real numbers that satisfy the equation x 9 = 0.

1. The collection of the vowels in the word probability. 2. The collection of real numbers that satisfy the equation x 9 = 0. C HPTER 1 SETS I. DEFINITION OF SET We begin our study of probability with the disussion of the basi onept of set. We assume that there is a ommon understanding of what is meant by the notion of a olletion

More information

ICCGLU. A Fortran IV subroutine to solve large sparse general systems of linear equations. J.J. Dongarra, G.K. Leaf and M. Minkoff.

ICCGLU. A Fortran IV subroutine to solve large sparse general systems of linear equations. J.J. Dongarra, G.K. Leaf and M. Minkoff. http://www.netlib.org/linalg/ig-do 1 of 8 12/7/2009 11:14 AM ICCGLU A Fortran IV subroutine to solve large sparse general systems of linear equations. J.J. Dongarra, G.K. Leaf and M. Minkoff July, 1982

More information

Scientific Computing: An Introductory Survey

Scientific Computing: An Introductory Survey Scientific Computing: An Introductory Survey Chapter 1 Scientific Computing Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign Copyright c 2002. Reproduction

More information

An Optimized Approach on Applying Genetic Algorithm to Adaptive Cluster Validity Index

An Optimized Approach on Applying Genetic Algorithm to Adaptive Cluster Validity Index IJCSES International Journal of Computer Sienes and Engineering Systems, ol., No.4, Otober 2007 CSES International 2007 ISSN 0973-4406 253 An Optimized Approah on Applying Geneti Algorithm to Adaptive

More information

the data. Structured Principal Component Analysis (SPCA)

the data. Structured Principal Component Analysis (SPCA) Strutured Prinipal Component Analysis Kristin M. Branson and Sameer Agarwal Department of Computer Siene and Engineering University of California, San Diego La Jolla, CA 9193-114 Abstrat Many tasks involving

More information

What Every Programmer Should Know About Floating-Point Arithmetic

What Every Programmer Should Know About Floating-Point Arithmetic What Every Programmer Should Know About Floating-Point Arithmetic Last updated: October 15, 2015 Contents 1 Why don t my numbers add up? 3 2 Basic Answers 3 2.1 Why don t my numbers, like 0.1 + 0.2 add

More information

Automatic Physical Design Tuning: Workload as a Sequence Sanjay Agrawal Microsoft Research One Microsoft Way Redmond, WA, USA +1-(425)

Automatic Physical Design Tuning: Workload as a Sequence Sanjay Agrawal Microsoft Research One Microsoft Way Redmond, WA, USA +1-(425) Automati Physial Design Tuning: Workload as a Sequene Sanjay Agrawal Mirosoft Researh One Mirosoft Way Redmond, WA, USA +1-(425) 75-357 sagrawal@mirosoft.om Eri Chu * Computer Sienes Department University

More information

Department of Electrical and Computer Engineering University of Wisconsin Madison. Fall

Department of Electrical and Computer Engineering University of Wisconsin Madison. Fall Department of Eletrial and Computer Engineering University of Wisonsin Madison ECE 553: Testing and Testable Design of Digital Systems Fall 2014-2015 Assignment #2 Date Tuesday, September 25, 2014 Due

More information

Floating Point Numbers

Floating Point Numbers Floating Point Numbers Summer 8 Fractional numbers Fractional numbers fixed point Floating point numbers the IEEE 7 floating point standard Floating point operations Rounding modes CMPE Summer 8 Slides

More information

Extracting Partition Statistics from Semistructured Data

Extracting Partition Statistics from Semistructured Data Extrating Partition Statistis from Semistrutured Data John N. Wilson Rihard Gourlay Robert Japp Mathias Neumüller Department of Computer and Information Sienes University of Strathlyde, Glasgow, UK {jnw,rsg,rpj,mathias}@is.strath.a.uk

More information

Compilation Lecture 11a. Register Allocation Noam Rinetzky. Text book: Modern compiler implementation in C Andrew A.

Compilation Lecture 11a. Register Allocation Noam Rinetzky. Text book: Modern compiler implementation in C Andrew A. Compilation 0368-3133 Leture 11a Text book: Modern ompiler implementation in C Andrew A. Appel Register Alloation Noam Rinetzky 1 Registers Dediated memory loations that an be aessed quikly, an have omputations

More information

NONLINEAR BACK PROJECTION FOR TOMOGRAPHIC IMAGE RECONSTRUCTION. Ken Sauer and Charles A. Bouman

NONLINEAR BACK PROJECTION FOR TOMOGRAPHIC IMAGE RECONSTRUCTION. Ken Sauer and Charles A. Bouman NONLINEAR BACK PROJECTION FOR TOMOGRAPHIC IMAGE RECONSTRUCTION Ken Sauer and Charles A. Bouman Department of Eletrial Engineering, University of Notre Dame Notre Dame, IN 46556, (219) 631-6999 Shool of

More information

-z c = c T - c T B B-1 A 1 - c T B B-1 b. x B B -1 A 0 B -1 b. (a) (b) Figure 1. Simplex Tableau in Matrix Form

-z c = c T - c T B B-1 A 1 - c T B B-1 b. x B B -1 A 0 B -1 b. (a) (b) Figure 1. Simplex Tableau in Matrix Form 3. he Revised Simple Method he LP min, s.t. A = b ( ),, an be represented by Figure (a) below. At any Simple step, with known and -, the Simple tableau an be represented by Figure (b) below. he minimum

More information

IEEE Standard 754 Floating Point Numbers

IEEE Standard 754 Floating Point Numbers IEEE Standard 754 Floating Point Numbers Steve Hollasch / Last update 2005-Feb-24 IEEE Standard 754 floating point is the most common representation today for real numbers on computers, including Intel-based

More information

Lesson 2: Right Triangle Trigonometry

Lesson 2: Right Triangle Trigonometry Lesson : Right Triangle Trigonometry lthough Trigonometry is used to solve many prolems, historially it was first applied to prolems that involve a right triangle. This an e extended to non-right triangles

More information

Adapting K-Medians to Generate Normalized Cluster Centers

Adapting K-Medians to Generate Normalized Cluster Centers Adapting -Medians to Generate Normalized Cluster Centers Benamin J. Anderson, Deborah S. Gross, David R. Musiant Anna M. Ritz, Thomas G. Smith, Leah E. Steinberg Carleton College andersbe@gmail.om, {dgross,

More information

Review Questions 26 CHAPTER 1. SCIENTIFIC COMPUTING

Review Questions 26 CHAPTER 1. SCIENTIFIC COMPUTING 26 CHAPTER 1. SCIENTIFIC COMPUTING amples. The IEEE floating-point standard can be found in [131]. A useful tutorial on floating-point arithmetic and the IEEE standard is [97]. Although it is no substitute

More information

Naïve Bayes Slides are adapted from Sebastian Thrun (Udacity ), Ke Chen Jonathan Huang and H. Witten s and E. Frank s Data Mining and Jeremy Wyatt,

Naïve Bayes Slides are adapted from Sebastian Thrun (Udacity ), Ke Chen Jonathan Huang and H. Witten s and E. Frank s Data Mining and Jeremy Wyatt, Naïve Bayes Slides are adapted from Sebastian Thrun (Udaity ), Ke Chen Jonathan Huang and H. Witten s and E. Frank s Data Mining and Jeremy Wyatt, Bakground There are three methods to establish a lassifier

More information

HEXA: Compact Data Structures for Faster Packet Processing

HEXA: Compact Data Structures for Faster Packet Processing Washington University in St. Louis Washington University Open Sholarship All Computer Siene and Engineering Researh Computer Siene and Engineering Report Number: 27-26 27 HEXA: Compat Data Strutures for

More information

Modeling of Wire Electrochemical Machining

Modeling of Wire Electrochemical Machining A publiation of 91 CHEMICAL ENGINEERING TRANSACTIONS VOL. 41, 214 Guest Editors: Simonetta Palmas, Mihele Masia, Annalisa Vaa Copyright 214, AIDIC Servizi S.r.l., ISBN 978-88-9568-32-7; ISSN 2283-9216

More information

An Alternative Approach to the Fuzzifier in Fuzzy Clustering to Obtain Better Clustering Results

An Alternative Approach to the Fuzzifier in Fuzzy Clustering to Obtain Better Clustering Results An Alternative Approah to the Fuzziier in Fuzzy Clustering to Obtain Better Clustering Results Frank Klawonn Department o Computer Siene University o Applied Sienes BS/WF Salzdahlumer Str. 46/48 D-38302

More information

Multiple Assignments

Multiple Assignments Two Outputs Conneted Together Multiple Assignments Two Outputs Conneted Together if (En1) Q

More information

Machine Vision. Laboratory Exercise Name: Student ID: S

Machine Vision. Laboratory Exercise Name: Student ID: S Mahine Vision 521466S Laoratory Eerise 2011 Name: Student D: General nformation To pass these laoratory works, you should answer all questions (Q.y) with an understandale handwriting either in English

More information

Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY Fall Test I Solutions

Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY Fall Test I Solutions Department of Eletrial Engineering and Computer iene MAACHUETT INTITUTE OF TECHNOLOGY 6.035 Fall 2016 Test I olutions 1 I Regular Expressions and Finite-tate Automata For Questions 1, 2, and 3, let the

More information

1.2 Round-off Errors and Computer Arithmetic

1.2 Round-off Errors and Computer Arithmetic 1.2 Round-off Errors and Computer Arithmetic 1 In a computer model, a memory storage unit word is used to store a number. A word has only a finite number of bits. These facts imply: 1. Only a small set

More information

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 = (

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 = ( Floating Point Numbers in Java by Michael L. Overton Virtually all modern computers follow the IEEE 2 floating point standard in their representation of floating point numbers. The Java programming language

More information

An Event Display for ATLAS H8 Pixel Test Beam Data

An Event Display for ATLAS H8 Pixel Test Beam Data An Event Display for ATLAS H8 Pixel Test Beam Data George Gollin Centre de Physique des Partiules de Marseille and University of Illinois April 17, 1999 g-gollin@uiu.edu An event display program is now

More information

Approximate logic synthesis for error tolerant applications

Approximate logic synthesis for error tolerant applications Approximate logi synthesis for error tolerant appliations Doohul Shin and Sandeep K. Gupta Eletrial Engineering Department, University of Southern California, Los Angeles, CA 989 {doohuls, sandeep}@us.edu

More information

9.4 Exponential Growth and Decay Functions

9.4 Exponential Growth and Decay Functions Setion 9. Eponential Growth and Dea Funtions 56 9. Eponential Growth and Dea Funtions S Model Eponential Growth. Model Eponential Dea. Now that we an graph eponential funtions, let s learn about eponential

More information

Sequential Incremental-Value Auctions

Sequential Incremental-Value Auctions Sequential Inremental-Value Autions Xiaoming Zheng and Sven Koenig Department of Computer Siene University of Southern California Los Angeles, CA 90089-0781 {xiaominz,skoenig}@us.edu Abstrat We study the

More information

CS:APP2e Web Aside ASM:X87: X87-Based Support for Floating Point

CS:APP2e Web Aside ASM:X87: X87-Based Support for Floating Point CS:APP2e Web Aside ASM:X87: X87-Based Support for Floating Point Randal E. Bryant David R. O Hallaron June 5, 2012 Notie The material in this doument is supplementary material to the book Computer Systems,

More information

Computing Basics. 1 Sources of Error LECTURE NOTES ECO 613/614 FALL 2007 KAREN A. KOPECKY

Computing Basics. 1 Sources of Error LECTURE NOTES ECO 613/614 FALL 2007 KAREN A. KOPECKY LECTURE NOTES ECO 613/614 FALL 2007 KAREN A. KOPECKY Computing Basics 1 Sources of Error Numerical solutions to problems differ from their analytical counterparts. Why? The reason for the difference is

More information

Floating Point Considerations

Floating Point Considerations Chapter 6 Floating Point Considerations In the early days of computing, floating point arithmetic capability was found only in mainframes and supercomputers. Although many microprocessors designed in the

More information

Numerical Computing: An Introduction

Numerical Computing: An Introduction Numerical Computing: An Introduction Gyula Horváth Horvath@inf.u-szeged.hu Tom Verhoeff T.Verhoeff@TUE.NL University of Szeged Hungary Eindhoven University of Technology The Netherlands Numerical Computing

More information

Query Evaluation Overview. Query Optimization: Chap. 15. Evaluation Example. Cost Estimation. Query Blocks. Query Blocks

Query Evaluation Overview. Query Optimization: Chap. 15. Evaluation Example. Cost Estimation. Query Blocks. Query Blocks Query Evaluation Overview Query Optimization: Chap. 15 CS634 Leture 12 SQL query first translated to relational algebra (RA) Atually, some additional operators needed for SQL Tree of RA operators, with

More information

On - Line Path Delay Fault Testing of Omega MINs M. Bellos 1, E. Kalligeros 1, D. Nikolos 1,2 & H. T. Vergos 1,2

On - Line Path Delay Fault Testing of Omega MINs M. Bellos 1, E. Kalligeros 1, D. Nikolos 1,2 & H. T. Vergos 1,2 On - Line Path Delay Fault Testing of Omega MINs M. Bellos, E. Kalligeros, D. Nikolos,2 & H. T. Vergos,2 Dept. of Computer Engineering and Informatis 2 Computer Tehnology Institute University of Patras,

More information

Bindel, Fall 2016 Matrix Computations (CS 6210) Notes for

Bindel, Fall 2016 Matrix Computations (CS 6210) Notes for 1 Logistics Notes for 2016-09-07 1. We are still at 50. If you are still waiting and are not interested in knowing if a slot frees up, let me know. 2. There is a correction to HW 1, problem 4; the condition

More information

A Unified Subdivision Scheme for Polygonal Modeling

A Unified Subdivision Scheme for Polygonal Modeling EUROGRAPHICS 2 / A. Chalmers and T.-M. Rhyne (Guest Editors) Volume 2 (2), Number 3 A Unified Subdivision Sheme for Polygonal Modeling Jérôme Maillot Jos Stam Alias Wavefront Alias Wavefront 2 King St.

More information

Mathematical preliminaries and error analysis

Mathematical 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 information

Finite arithmetic and error analysis

Finite arithmetic and error analysis Finite arithmetic and error analysis Escuela de Ingeniería Informática de Oviedo (Dpto de Matemáticas-UniOvi) Numerical Computation Finite arithmetic and error analysis 1 / 45 Outline 1 Number representation:

More information

Introduction to Seismology Spring 2008

Introduction to Seismology Spring 2008 MIT OpenCourseWare http://ow.mit.edu 1.510 Introdution to Seismology Spring 008 For information about iting these materials or our Terms of Use, visit: http://ow.mit.edu/terms. 1.510 Leture Notes 3.3.007

More information

Floating Point Arithmetic

Floating Point Arithmetic Floating Point Arithmetic Clark N. Taylor Department of Electrical and Computer Engineering Brigham Young University clark.taylor@byu.edu 1 Introduction Numerical operations are something at which digital

More information

Classes of Real Numbers 1/2. The Real Line

Classes of Real Numbers 1/2. The Real Line Classes of Real Numbers All real numbers can be represented by a line: 1/2 π 1 0 1 2 3 4 real numbers The Real Line { integers rational numbers non-integral fractions irrational numbers Rational numbers

More information

Principles of Scientific Computing Sources of Error

Principles of Scientific Computing Sources of Error Principles of Scientific Computing Sources of Error Jonathan Goodman last revised January 6, 2006 1 In scientific computing, we never expect to get the exact answer. Inexactness is practically the definition

More information

Gradient based progressive probabilistic Hough transform

Gradient based progressive probabilistic Hough transform Gradient based progressive probabilisti Hough transform C.Galambos, J.Kittler and J.Matas Abstrat: The authors look at the benefits of exploiting gradient information to enhane the progressive probabilisti

More information

1.3 Floating Point Form

1.3 Floating Point Form Section 1.3 Floating Point Form 29 1.3 Floating Point Form Floating point numbers are used by computers to approximate real numbers. On the surface, the question is a simple one. There are an infinite

More information

Improved Vehicle Classification in Long Traffic Video by Cooperating Tracker and Classifier Modules

Improved Vehicle Classification in Long Traffic Video by Cooperating Tracker and Classifier Modules Improved Vehile Classifiation in Long Traffi Video by Cooperating Traker and Classifier Modules Brendan Morris and Mohan Trivedi University of California, San Diego San Diego, CA 92093 {b1morris, trivedi}@usd.edu

More information

Floating Point Representation in Computers

Floating Point Representation in Computers Floating Point Representation in Computers Floating Point Numbers - What are they? Floating Point Representation Floating Point Operations Where Things can go wrong What are Floating Point Numbers? Any

More information

CS321 Introduction To Numerical Methods

CS321 Introduction To Numerical Methods CS3 Introduction To Numerical Methods Fuhua (Frank) Cheng Department of Computer Science University of Kentucky Lexington KY 456-46 - - Table of Contents Errors and Number Representations 3 Error Types

More information

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

Truncation 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 information

COMP 181. Prelude. Intermediate representations. Today. Types of IRs. High-level IR. Intermediate representations and code generation

COMP 181. Prelude. Intermediate representations. Today. Types of IRs. High-level IR. Intermediate representations and code generation Prelude COMP 181 Intermediate representations and ode generation November, 009 What is this devie? Large Hadron Collider What is a hadron? Subatomi partile made up of quarks bound by the strong fore What

More information

Video Data and Sonar Data: Real World Data Fusion Example

Video Data and Sonar Data: Real World Data Fusion Example 14th International Conferene on Information Fusion Chiago, Illinois, USA, July 5-8, 2011 Video Data and Sonar Data: Real World Data Fusion Example David W. Krout Applied Physis Lab dkrout@apl.washington.edu

More information