Basic building blocks for a triple-double intermediate format

Size: px
Start display at page:

Download "Basic building blocks for a triple-double intermediate format"

Transcription

1 Basic building blocks for a triple-double intermediate format corrected version) Christoph Quirin Lauter February 26, 2009 Abstract The implementation of correctly rounded elementary functions needs high intermediate accuracy before final rounding. This accuracy can be provided by pseudo-) expansions of size three, i.e. a triple-double format. The report presents all basic operators for such a format. Triple-double numbers can be redundant. A renormalization procedure is presented and proven. Elementary functions implementations need addition and multiplication sequences. These operators must take operands in double, double-double and triple-double format. The results must be accordingly in one of the formats. Several procedures are presented. Proofs are given for their accuracy bounds. Intermediate triple-double results must finally be correctly rounded to double precision. Two effective rounding sequences are presented, one for round-to-nearest mode, one for the directed rounding modes. Their complete proofs constitute half of the report. Introduction The implementation of correctly rounded double precision elementary functions needs high accuracy intermediate formats [7, 4,, 3]. To give an order of magnitude, in most cases 20 bits of intermediate accuracy are needed for assuring the correct rounding property [3]. In contrast, the native IEEE 754 double precision format offers 53 bits of accuracy. Well-know techniques allow to double this accuracy [5]. Nevertheless the resulting accuracy, 06 bits, is not sufficient. Tripling it would be enough. Using expansions of floating point numbers allows to expand still more the accuracy of a native floating point type. An expansion is a non-evaluated sum of some floating point numbers in a floating point format [6, 9, 0]. However the techniques for manipulating general expansions presented in literature are too costly for the implementation of elementary functions. In this report, we are going to consider expansions of three double precision floating point numbers, i.e. we are going to investigate on a triple double format. In our case, we will hence manipulate floating point numbers x h + x m + x l ) with x h, x m, x l F. After making some definitions and an analysis of a procedure that we call renormalization, we will consider addition and multiplication procedures for triple-double numbers. These will also comprise operations linking the triple double format with the native double and a double-double format. In the end, we will present and prove in particular two final rounding sequences for correctly rounding a triple-double number to the base double format.

2 2 Definitions It will be necessary to define a normal form of a triple-double number because it is clear that the triple-double floating point format - or that of pseudo-)expansions in general - is redundant: there exist numbers ˆx such that there are different triplets x h, x m, x l ) F 3 such that ˆx = x h + x m + x l. It is easy to see that a representation in such a format is unique if the numbers forming the expansion are ordered by decreasing 0 and if the latter are such that there is no binary) digit represented by two bits of the significands of two different numbers of the expansion. The sign bit has in this case the same role as an additional bit of the significant [6]. As we will see, the need for a normal form for each triple-double number is not directly motivated by needs of the addition and multiplication operators we will have to define. As long as the latter operate correctly, i.e. between known error bounds, on numbers whose representation in a triple-double format is not unique, we are not obliged to recompute normal forms. On the other hand, when we want to round down such a higher precision number to a native double in one of the different rounding modes), a normal form will be needed. If we could not provide one, we would assist to a explosion of different cases to be handled by the rounding sequence. Let us first define some notations that are needed for the analysis of numerical algorithms like the ones that we are going to consider. Definition 2. Predecessor and successor of a floating point number) Let be x F a floating point number. Let be < the total ordering on F. If x is positive or zero we will design by x + the direct successor of x in F with regard to < and we will notate x its predecessor. If x is negative we will design by x the successor and by x + the predecessor of x. In any case, we will design by succ x) the successor of x in F with regard to < and pred x) its predecessor. This definition 2. is inspired by [4]. Definition 2.2 Unit on the last place the ulp function) Let be x F a double precision number and let be x + its successor resp. negative). So x + x if x 0 and x + + ulp x) = 2 ulp ) x 2 if x + but x + = + ulp x) if x < 0 This definition is inspired by [4], too. ulp function. Concerning the overlap we define finally: Definition 2.3 Overlap) Let x h, x l F be two non-subnormal double precision numbers. We will say that x h and x l overlap iff predecessor if x is Compare [8] for further research on the subject of the x l ulp x h ) Let be x h, x m, x l F the components of a triple-double number. We will suppose that they are not subnormals. So, we will say that there is overlap iff x h and x m or x m and x l or x h and x l overlap. Definition 2.4 Normal form) Let be x h, x m, x l F three non-subnormal floating point numbers forming the triple-double number x h + x m + x l. We will say that x h + x m + x l are in normal form iff there is no overlap between its components. Further, we will say that x h + x m + x l is normalised. 2

3 Having made this definition, let us remark that it is deeply inspired by our direct needs and not by abstract analysises on how to represent real numbers. Anyway, the fact that an expansion is not overlapping is not a sufficient condition for its representing an unique floating point number. The implementation of addition and multiplication operators will be finally be based on computations on the components of the operands or partial products in the case of a multiplication) followed by a final summing up for regaining the triple-double base format. As we do not statically know the magnitudes of the triple-double operands and its components, we will not be able to guarantee that in any case there will not be any overlap in the result. On the other hand, we strive to develop a renormalization sequence for recomputing normal forms. These will be handy, as we already said, for the final rounding and, if needed, i.e. if sufficiently good static bounds can not be given, before handing over a result as an operand to a following operation. Such a renormalization sequence must guarantee that for each triple-double in argument if needed verifying some preconditions on an initial overlap), the triple-double number returned will be normalised and that the sum of the components for the first number is exactly the same as the one of the components of the latter. Definition 2.5 The Add2 algorithm) Let A be an algorithm taking as arguments two double precision numbers x, y F and returning two double precision floating point numbers r h, r l F. We will call A the Add2 algorithm iff it verifies that x, y F.r h + r l = x + y x, y F. r l 2 53 r h r h = x + y) r l = x + y r h i.e. iff it makes an exact addition of two floating point numbers such that the components of the double-double expansion in result are non-overlapping and if the most significant one is the floating point number nearest to the sum of the numbers in argument. Definition 2.6 The Mul2 algorithm) Let A be an algorithm taking as arguments two double precision numbers x, y F and returning two double precision floating point numbers r h, r l F. We will call A the Mul2 algorithm iff it verifies that x, y F.r h + r l = x y x, y F. r l 2 53 r h r h = x y) r l = x y r h i.e. iff it makes an exact multiplication of two floating point numbers such that the components of the double-double expansion in result are non-overlapping and if the most significant one is the floating point number nearest to the sum of the numbers in argument. We will pass over the existence proof of such algorithms. Consult [5] on this subject. Let us now give some main lemmas that can be deduced from the definition 2.2 of the ulp function. 3

4 Lemma 2.7 The ulp functions with regard to upper bounds) Let be x h and x l two non-subnormal floating point numbers. So x l < ulp x h ) x l 2 52 x h Proof Let us suppose that x l < ulp x h ) and that x l > 2 52 x h. So we get the following inequality 2 52 x h < ulp x h ) Without loss of generality, let us suppose now that x h > 0 and that x + h + where x+ h is the successor of x h in the ordered set of floating point numbers. So we know by the definition of non-subnormal floating point number in double precision that there exists m N and e Z such that x h = 2 e m with 2 52 m < Anyway, one can check that { x + h = 2e m + ) if m + < e otherwise So 2 cases must be treated separately: st case: x + h = 2e m + ) So we get 2 e m + ) 2 e m > e m > 2 52 m In contrast, m 2 52, so we obtain the strict inequality > which contradicts the hypotheses. 2nd case: x + h = 2e In this case, we know that m = We can deduce that 2 e e 2 53 ) > e 2 53 ) > This last inequality is a direct contradiction with the hypotheses. Lemma 2.8 Commutativity of the x + and x operators with unary ) Let be x F a positive floating point number. So, x) + = x +) and x) = x ) Proof Since the set of the floating point numbers is symmetrical around 0, we get x) + = pred x) = succ x) = x +) and x) = succ x) = pred x) = x ) 4

5 Lemma 2.9 x + and x for an integer power of 2) Let be x F a non-subnormal floating point number such that it exists e Z such that where p 2 is the format s precision. So, Proof If x > 0, we get and If x is negative it suffices to apply lemma 2.8. x = ±2 e 2 p x x = 2 x + x ) x x = 2 e 2 p 2 e 2 p+ ) = 2 e x + x = 2 e 2 p + ) 2 e 2 p = 2 e Lemma 2.0 x + and x for a float different from an integer power of 2) Let be x F a non-subnormal floating point number such that it does not exist any e Z such that x = ±2 e 2 p where p 2 is the format s precision. So, x x = x + x Proof If x > 0 we know that there exist e Z and m N such that with x = 2 e m 2 p < m < 2 p because x is not exactly an integer power of 2. Further, one checks that x + = 2 e m + ) even if m = 2 p and that because the lower bound given for m is strict. So one gets If x is negative it suffices to apply lemma 2.8. x = 2 e m ) x x = 2 e m 2 e m ) = 2 e = 2 e m + ) 2 e m = x + x Lemma 2. Factorized integer powers of 2 and the operators x + and x ) Let be x F a non-subnormal floating point number such that 2 x is still not subnormal. So, ) + 2 x = 2 x+ and ) 2 x = 2 x 5

6 Proof Without loss of generality let us suppose that x is positive. Otherwise we easily apply lemma 2.8. So, if x can be written x = 2 e m with m + 2 p+ where p is the precision then Otherwise, ) + 2 x = 2 e m ) + = 2 e m + ) = 2 x+ ) + 2 x = 2 e 2 p+ )) + = 2 e + 2 p = 2 x+ One can check that one obtains a completely analogous result for x. Lemma 2.2 Factor 3 of an integer power of 2 in argument of the x + operator) Let be x F a positive floating point number such that x is not subnormal, x + and 3 x) + are different from +, and that e Z. x = 2 e 2 p where p 3 is the precision of the format F. So the following equation holds 3 x) + + ulp x) = 3 x + Proof We can easily check the following 3 x) + + ulp x) = 3 x) + x + x ) = 3 2 e 2 p ) e 2 p ) + 2 e 2 p = 2 + ) 2 e 2 p ) e 2 p + ) 2 e 2 p = 2 2 e 2 p + 2 ) + 2 2e 2 p + 2 e = 2 e+ 2 p + 2 p )) e = 2 e+ 2 p + 2 p + ) + 2 e = 2 e+ 2 p + 2 p ) + 2 e+ + 2 e = 2 e+ 2 p + 2 p ) e = 3 2 e 2 p e = 3 2 e 2 p + ) = 3 2 e 2 p ) + = 3 x + Lemma 2.3 Monotony of the ulp function) The ulp function is monotonic for non-subnormal positive floating point numbers and it is monotonic for non-subnormal negative floating point numbers, i.e. x, y F. denorm < x y ulp x) ulp y) x, y F. x y < denorm ulp x) ulp y) where denorm is the greatest positive subnormal. Proof As a matter of fact it suffices to show that the ulp function is monotonic for non-subnormal floating point numbers and to apply its definition 2.2 for the negative case. Let us suppose so that we have two floating point numbers x, y F such that denorm < x < y. 6

7 Without loss of generality we suppose that x + + and that y + +. Otherwise we apply definition 2.2 of the ulp function and lemma 2.. So we get ulp y) ulp x) = y + y x + + x It suffices now to show that y + x + y + x 0 We can suppose that we would have x = 2 ex m x y = 2 ey m y with e x, e y Z, 2 p m x, m y < 2 p+. Since y > x, we clearly see that e y, m y ) lex e x, m x ) So four different cases are possible:. x + = 2 ex m x + ) y + = 2 ey m y + ) Hence y + x + y + x = 2 ey m y + ) 2 ex m x + ) 2 ey m y + 2 ex m x = 2 ey 2 ex 0 2. which yields to x + = 2 ex m x + ) y + = 2 ey+ 2 p y + x + y + x = 2 ey+ 2 p 2 ex m x + ) 2 ey 2 p+ ) + 2 ex m x = 2 ey 2 ex 0 3. x + = 2 ex+ 2 p y + = 2 ey m y + ) One checks that y + x + y + x = 2 ey m y + ) 2 ex+ 2 p 2 ey m y + 2 ex 2 p+ ) = 2 ey 2 ex 0 7

8 4. x + = 2 ex+ 2 p y + = 2 ey+ 2 p Thus y + x + y + x = 2 ey+ 2 p 2 ex+ 2 p 2 ey 2 p+ ) + 2 ex 2 p ) = 2 ey 2 ex 0 This finishes the proof. 3 A normal form and renormalization procedures Let us now analyse a renormalization algorithm. We will prove its correctness be a series of lemmas and a final theorem. Let be the following procedure: Algorithm 3. Renormalization) In: a h, a m, a l F verifying the following preconditions: Preconditions: None of the numbers a h, a m, a l is subnormal a h and a m do not overlap in more than 5 bits a m and a l do not overlap in more than 5 bits which means formally: Out: r h, r m, r l F a m 2 2 a h a l 2 2 a m a l 2 4 a h t h, t l ) Add2 a m, a l ) r h, t 2l ) Add2 a h, t h ) r m, r l ) Add2 t 2l, t l ) Consult also [6] on the subject of this algorithm. Let us give now some lemmas on the properties of the values returned by algorithm 3. and on the intermediate ones. Lemma 3.2 Exact sum) For each triple-double number a h +a m +a l, algorithm 3. returns a triple-double number r h +r m +r l such that a h + a m + a l = r h + r m + r l Proof This fact is a trivial consequence of the properties of the Add2 algorithm. 8

9 Lemma 3.3 Rounding of the middle component) For each triple-double number a h +a m +a l, algorithm 3. returns a triple-double number r h +r m +r l such that r m = r m + r l ) The same way, the intermediate and final value will verify the following properties: t h = a m + a l ) r h = a h + t h ) t l 2 53 t h t 2l 2 53 r h In particular, r m will not be equal to 0 if r l is not equal to 0. Proof This fact is a trivial consequence of the properties of the Add2 algorithm. Lemma 3.4 Upper bounds) For all arguments of algorithm 3., the intermediate and final values t h, t l, t 2l and r m can be bounded upwards as follows: Proof t h 2 a h t l 2 54 a h t 2l 2 52 a h t m 2 5 a h. Upper bound for t h : We have supposed that So we can check that a m 2 2 a h a l 2 4 a h t h a m + a l a h 2 2 a h a h a h 2 a h 2. Upper bound for t l : Using the properties of the Add2 algorithm we can get to know that t l 2 53 t h which yields finally to t l 2 54 a h 3. Upper bound for t 2l : t 2l 2 53 r h 2 53 a h + t h ) 2 53 a h t h a h t h 2 53 a h a h a h a h 2 52 a h 9

10 4. Upper bound for r m : r m t 2l t l t 2l + t l t 2l + t l 2 52 a h a h a h a h 2 5 a h Lemma 3.5 Special case for r h = 0) For all arguments verifying the preconditions of algorithm 3., r h will not be equal to 0 if r m is not equal to 0. Formally: r h = 0 r m = 0 Proof Let us suppose that r h = 0 and that r m 0. So we get because we have already shown that r h = a h + t h ) ) 2 a h = 2 a h t h 2 a h So for r h being equal to 0, a h must be equal to 0. In contrast, this yields to t h = 0 because r h = 0 + t h ) = t h This implies that t l = 0 because of the properties of the Add2 procedure. The same way, we get t 2l = 0. We can deduce from this that 0 r m = 0 + 0) = 0 which is a contradiction. Lemma 3.6 Lower bound for r h ) For all arguments verifying the preconditions of algorithm 3., the final result r h can be bounded in magnitude as follows: r h 2 a h Proof We have that r h = a h t h Clearly, if a h and t h have the same sign, we get r h a h 2 a h Otherwise - a h and t h are now of the opposed sign - we have already seen that t h 2 a h So, in this case, too, we get r h 2 a h 0

11 Corollary 3.7 Additional property on the Add2 procedure) Let be r h and r l two double precision floating point numbers returned by the Add2 procedure. So r l 2 ulp r h) Proof By the definition 2.5 of the Add2 procedure, we have r h + r l = x + y and r h = x + y) and r l = x + y r l. Thus the number r l = x + y) x + y) = x + y) x y) is the absolute error of correctly rounded IEEE 754 addition. It is bounded by 2 ulp r h) which gives us the desired result. Theorem 3.8 Correctness of the renormalization algorithm 3.) For all arguments verifying the preconditions of procedure 3., the values returned r h, r m and r l will not overlap unless they are all equal to 0 and their sum will be exactly the sum of the values in argument a h, a m and a l. Proof The fact that the sum of the values returned is exactly equal to the sum of the values in argument has already been proven by lemma 3.2. Without loss of generality, we will now suppose that neither r h nor r m will be 0 in which case all values returned would be equal to 0 as we have shown it by lemmas 3.5 and 3.3. Using lemma 3.3, we know already that r m and r l do not overlap. Let us show now that r h and r m do not overlap by proving that the following inequality is true There are two different cases to be treated. st case: t 2l = 0 We know that r m 3 4 ulp r h) < ulp r h ) r m = t 2l + t l ) = 0 + t l ) = t l When showing lemma 3.4, we have already proven that Using lemma 3.6, we therefore know that which is the result we wanted to prove. 2nd case: t 2l 0 Still using lemma 3.4, we have shown that t l 2 54 a h r m 2 53 r h t h 2 a h In consequence, when the IEEE 754 [2] addition r h = a h t h is ported out, the rounding will be done at a bit of weight heigher than one ulp t h ) because t 2l is strictly greater than 0 and because a h and t h do not completely overlap. Therefore we can check that t 2l ulp t h ) With the result of lemma 3.4 we already mentioned, we can deduce that t 2l 2 ulp t h) 2 t 2l

12 So one can verify the following upper bound using among others lemma 3.7: r m = t 2l + t l ) ) 3 2 t 2l ) 3 4 ulp r h) = 3 4 ulp r h) One remarks that the last simplification is correct here because ulp is always equal to an integer power of 2 and because the precision of a double is greater than 4 bits. 4 Operators on double-double numbers Since we dispose now of a renormalization procedure which is effective and proven, we can now consider the different addition and multiplication operators we need. They will surely work finally on expansions of size 3, but the double-double format [5] must be analysed, too, because it is at the base of the triple-double format. We already mentioned that on definition and analysis of this operators, we need not care such a lot of the overlap in the components of a triple-double number any more: as long as the overlap does not make us loose a too much of the final accuracy because several bits of the significand are represented twice, overlap is not of an issue for intermediate values. At the end of triple-double computations, it will be sufficient to apply once the renormalization procedure. In order to measure the consequences of an overlap in the operands on final accuracy and in order to be able to follow the increase of the overlap during computations in triple-double, we will indicate for each operator which produces a triple double result or which takes a triple-double operand not only a bound for relative and absolute rounding errors but also a bound for the maximal overlap of the values returned. All this bounds will be parameterised by a variable representing the maximal overlap of the triple-double arguments. 4. The addition operator Add22 Let us analyse first the following addition procedure: Algorithm 4. Add22) In: two double-double numbers, a h + a l and b h + b l Out: a double-double number r h + r l Preconditions on the arguments: a l 2 53 a h b l 2 53 b h Algorithm: 2

13 t a h b h if a h b h then else Compare [] concerning algorithm 4.. t 2 a h t t 3 t 2 b h t 4 t 3 b l t 5 t 4 a l t 2 b h t t 3 t 2 a h t 4 t 3 a l t 5 t 4 b l end if r h, r l ) Add2 t, t 5 ) Theorem 4.2 Relative error of algorithm 4. Add22 without occurring of cancellation) Let be a h + a l and b h + b l the double-double arguments of algorithm 4. Add22. If a h and b h have the same sign, so we know that r h + r l = a h + a l ) + b h + b l )) + ε) where ε is bounded as follows: ε 2 03,5 Proof Since the algorithm Add22 ends by a call to the Add2 procedure, it suffices to show that t + t 5 = a h + a l ) + b h + b l )) + ε) Further, since the two branches of the algorithm are symmetrical, we can suppose that a h b h and consider only one branch without loss of generality. Finally, we remark that the following lines of the Add22 procedure constitute a non-conditional Add2 with arguments a h and b h and the result t + t 3 : Thus, we get with t = a h b h t 2 = a h t t 3 = t 2 b h t 5 = t 4 a l = t 4 + a l ) + ε ) = t 3 + bl) + ε 2 ) + a l ) + ε ) = t 3 + a l + b l + δ δ = t 3 ε 2 + b l ε 2 + t 3 ε + b l ε + t 3 ε 2 ε 2 + b l ε 2 ε 2 + a l ε For giving an upper bound for δ, let us first give an upper bound for t 3, a l and b l as function of a h + b h using the following bounds that we know already: a l 2 53 a h b l 2 53 b h t t 3

14 We get therefore and than t t = 2 53 a h b h 2 53 a h + b h a h + b l a l 2 53 a h 2 53 a h + b h The last bound is verified because we suppose that a h and b h have the same sign. Finally, since a h b h, Thus we get for δ : b l 2 53 b h 2 53 a h 2 53 a h + b h δ a h + b h ) a h + b h ) Let us now give a lower bound for a h + a l + b h + b l as a function of a h + b h in order to be able to give a relative error bound for the procedure Add22. We have that So we can check that Concerning δ, this yields to δ a h + a l + b h + b l One easily checks that a l + b l a l + b l 2 53 a h b h 2 52 a h 2 52 a h + b h a h + a l + b h + b l 2 52) a h + b h ) ) 2 03,5 from which one trivially deduces the affirmation. Theorem 4.3 Relative error of algorithm 4. Add22 with a bounded cancellation) Let be a h + a l and b h + b l the double-double arguments of 4. Add22. If a h and b h are of different sign and if one can check that for µ so the returned result will verify where ε is bounded as follows: b h 2 µ a h r h + r l = a h + a l ) + b h + b l )) + ε) ε µ 2 µ

15 Proof Let us reuse the results obtained at the proof 4. and let us start by giving an upper bound for b l as a function of a h : b l 2 53 b h 2 53 µ a h Let us now continue with a lower bound for a h + b h still as a function of a h : We get in consequence and Thus we can check that a h + b h a h 2 µ) a l µ a h + b h b l 2 53 µ 2 µ a h + b h δ a h + b h µ 2 µ Once again, we must give a lower bound for a h + a l + b h + b l with regard to a h + b h : We know that So Thus we get for δ a l + b l a l + b l 2 52 a h µ a h + b h a h + a l + b h + b l a h + b h 2 µ µ δ 2 µ a h + a l + b h + b l 2 µ µ 2 µ = a h + a l + b h + b l µ 2 µ 2 52 So finally the following inequality is verified for the relative error ε: ε µ 2 µ 2 52 We can still give a less exact upper bound for this term by one that does not depend on µ because µ : 2 µ 3 2 µ so ε 2 02 Theorem 4.4 Absolute error of algorithm 4. Add22 general case)) Let be a h + a l and b h + b l the double-double arguments of algorithm 4. Add22. The result r h + r l returned by the algorithm verifies where δ is bounded as follows: r h + r l = a h + a l ) + b h + b l ) + δ δ max 2 53 a l + b l, 2 02 a h + a l + b h + b l ) 5

16 Proof Without loss of generality, we can now suppose that 2 a h b h a h and that a h and b h have different signs because for all other cases, the properties we have to show are a direct consequence of theorems 4.2 and 4.3. So we have 2 a h b h 2 a h and So the floating point operation 2 b h a h 2 b h t = a h b h is exact by Sterbenz lemma []. In consequence, t 3 will be equal to 0 because, as we have already mentioned, the operations computing t and t 3 out of a h and b h constitute a Add2 whose properties assure that We can deduce that t 3 = a h + b h t t 4 = t 3 b l = b l and can finally check that with So we get with t 5 = t 4 a l = t 4 + a l ) + ε ) ε 2 53 r h + r l = t + t 5 = a h + a l + b h + b l ) + δ δ 2 53 a l + b l which yields to the bound to be proven δ = max 2 53 a l + b l, 2 02 a h + a l + b h + b l ) Theorem 4.5 Output overlap of algorithm 4. Add22) Let be a h + a l and b h + b l the double-double arguments of algorithm 4. Add22. So the values r h and r l returned by the algorithm will not overlap at all and will verify r l 2 53 r h Proof The proof of the affirmed property is trivial because the procedure Add22 sequence Add2 which assures it. ends by a call to 6

17 4.2 The multiplication operator Mul22 Let us now consider the multiplication operator Mul22: Algorithm 4.6 Mul22) In: two double-double numbers, a h + a l and b h + b l Out: a double-double number r h + r l Preconditions on the arguments: Algorithm: a l 2 53 a h b l 2 53 b h t, t 2 ) Mul2 a h, b h ) t 3 a h b l t 4 a l b h t 5 t 3 t 4 t 6 t 2 t 5 r h, r l ) Add2 t, t 6 ) Compare also to [] concerning algorithm 4.6. Theorem 4.7 Relative error of algorithm 4.6 Mul22) Let be a h + a l and b h + b l the double-double arguments of algorithm 4.6 Mul22. So the values returned r h and r l verify r h + r l = a h + a l ) b h + b l )) + ε) where ε is bounded as follows: ε 2 02 Further r h and r l will not overlap at all and verify r l 2 53 r h Proof Since algorithm 4.6 ends by a call to the Add2 procedure, the properties of the latter yield to the fact that r h and r l do not overlap at all and that r l 2 53 r h. In order to give upper bounds for the relative and absolute error of the algorithm, let us express t 6 as a function of t 2, a h, a l, b h and b l joined by the error term δ. We get t 6 = t 2 a h b l a l b h ) = t 2 + a h b l + ε ) + a l b h + ε 2 )) + ε 3 )) + ε 4 ) where ε i 2 53, i =, 2, 3, 4. Simplifying this expression, we van verify that with t 6 = t 2 + a h b l + a l b h + δ δ a l b l + a h b l ε + a l b h ε 2 + a h b l ε 3 + a h b l ε ε 3 + a l b h ε 3 + a l b h ε ε 3 +a h b l ε 4 + a l b h ε 4 + a h b l ε ε 4 + a l b h ε 2 ε 4 + a h b l ε 3 ε 4 +a h b l ε ε 3 ε 4 + a l b h ε 3 ε 4 + a l b h ε 2 ε 3 ε 4 a h b h ) a h b h

18 For checking the given bound, we have supposed the following inequalities: and a l 2 53 a h a l 2 53 a h Let us now give a lower bound for a h + a l ) b h + b l ) as a function of a h b h. For doing so, we give an upper bound for a h b l + a l b h + a l b l. We verify since: a h b l + a l b h + a l b l a h b l + a l b h + a l b l 2 53 a h b h a h b h a h b h 2 5 a h b h This yields to a h + a l ) b h + b l ) a h b h 2 5) 2 a h b h from which we deduce that δ 2 02 a h + a l ) b h + b l ) which gives us as an bound for the relative error r h + r l = a h + a l ) b h + b l ) + ε) with ε Addition operators for triple-double numbers 5. The addition operator Add33 We are going to consider now the addition operator Add33. We will only analyse a simplified case where the arguments values verify some bounds statically known. Algorithm 5. Add33) In: two triple-double numbers, a h + a m + a l and b h + b m + b l Out: a triple-double number r h + r m + r l Preconditions on the arguments: b h 3 4 a h a m 2 αo a h a l 2 αu a m b m 2 βo b h b l 2 βu b m α o 4 α u β o 4 β u Algorithm: 8

19 r h, t ) Add2 a h, b h ) t 2, t 3 ) Add2 a m, b m ) t 7, t 4 ) Add2 t, t 2 ) t 6 a l b l t 5 t 3 t 4 t 8 t 5 t 6 r m, r l ) Add2 t 7, t 8 ) Theorem 5.2 Relative error of algorithm 5. Add33) Let be a h +a m +a l and b h +b m +b l the triple-double arguments of algorithm 5. Add33 verifying the given preconditions. So the following egality will hold for the returned values r h, r m and r l where ε is bounded by: r h + r m + r l = a h + a m + a l ) + b h + b m + b l )) + ε) ε 2 minαo+αu,βo+βu) minαo,βo) 98 The returned values r m and r l will not overlap at all and the overlap of r h and r m will be bounded by the following expression: r m 2 minαo,βo)+5 r h Proof The procedure 5. ends by a call to the Add2 sequence. One can trivially deduce that r m and r l do not overlap at all and verify r l 2 53 r m Further, it suffices that the bounds given at theorem 5.2 hold for t 7 and t 8 because the last addition computing r m and r l will be exact. The same way, one can deduce the following inequalities out of the properties of the Add2 procedure. They will become useful during this proof. t 2 53 r h t t 2 t t 7 Let us start the proof by giving bounds for the magnitude of r h with regard to a h : We have on the one hand and on the other r h = a h + b h ) = a h + b h ) a h + b h ) a h + 3 ) 4 a h 2 a h ) = 2 a h r h = a h + b h ) ) 4 a h = 4 a h 9

20 So we know that 4 a h r h 2 a h. It is now possible to give the following upper bounds for t, t 2, t 3, t 7, t 4, t 6 and t 6 : t 2 53 r h a h = 2 5 a h t 2 a m + b m ) a m + b m ) 2 αo a h + 2 βo b h ) 2 αo a h + 2 βo 3 ) 4 a h ) 2 minαo,βo)+ a h = 2 minαo,βo)+ a h t t minαo,βo)+ a h = 2 minαo,βo) 52 a h t 7 t + t 2 ) t + t 2 ) ) 2 5 a h + 2 minαo,βo)+ a h ) 2 minαo,βo)+2 a h = 2 minαo,βo)+2 a h t t minαo,βo)+2 a h = 2 minαo,βo) 5 a h and finally t 6 a l + b l ) 2 αo 2 αu a h + 2 βo 2 βu 3 ) 4 a h ) 2 minαo+αu,βo+βu)+ a h = 2 minαo+αu,βo+βu)+ a h t 5 t 3 + t 4 ) ) 2 minαo,βo) 52 a h + 2 minαo,βo) 5 a h ) 2 minαo,βo) 50 a h = 2 minαo,βo) 50 a h 20

21 Using the fact that the addition Add2 is exact, it is easy to show that we have exactly r h + t 7 + t 3 + t 4 = a h + a m + b h + b m Further, we can check t 8 = t 3 2 t 4 ) a l 3 b l ) = t 3 + t 4 + a l + b l + δ with δ t 3 ε 3 + t 4 ε 2 + a l ε 3 + b l ε 3 + t 3 ε + t 4 ε + t 3 ε ε 2 + t 4 ε ε 2 + a l ε + b l ε 2 + a l ε ε 3 + b l ε ε 3 where for i {, 2, 3}, ε i is the relative error bound of the floating point addition i and verifies So we get immediately ε i 2 53 r h + r m + r l = r h + t 7 + t 8 = a h + a m + a l ) + b h + b m + b l ) + δ Let us now express a h + a m + a l ) + b h + b m + b l ) as a function of a h : and, the same way round, which allows for noting a h + a m + a l a h + a m + a l a h + 2 αo a h + 2 αo αu a h 2 a h b h + b m + b l 2 b h 3 2 a h a h + a m + a l ) + b h + b m + b l ) 2 2 a h In order to give a lower bound for this term, let us prove an upper bound for b h + a m + b m + a l + b l as follows So we get b h + a m + b m + a l + b l b h + a m + b m + a l + b l 3 4 a h + 2 αo a h + 2 βo 3 4 a h + 2 αo αu a h +2 βo βu 3 4 a h 7 8 a h a h + a m + a l ) + b h + b m + b l ) 8 a h Using this bounds, we can give upper bounds for the absolute error δ first as a function of a h and than as a function of a h + a m + a l ) + b h + b m + b l ) for deducing finally a bound for the relative error. So we get δ t 3 ε 3 + t 4 ε 2 + a l ε 3 + b l ε 3 + t 3 ε + t 4 ε + t 3 ε ε 2 + t 4 ε ε 2 + a l ε + b l ε 2 + a l ε ε 3 + b l ε ε 3 a h ε 2

22 with This yields to with ε minαo,βo) minαo,βo) αo αu βo βu minαo,βo) minαo,βo) minαo,βo) minαo,βo) αo αu βo βu αo αu βo βu 2 minαo,βo) minαo+αu,βo+βu) 50 r h + r m + r l = a h + a m + a l ) + b h + b m + b l )) + ε) ε 2 minαo,βo) minαo+αu,βo+βu) 47 In order to finish the prove, it suffices now to give an upper bound for the maximal overlap between r h and r m because we have already shown that r m and r l do not overlap at all. So we can check r 8 t 5 + t 6 ) ) 2 minαo,βo) 50 a h + 2 minαo+αu,βo+βu)+ a h ) 2 minαo,βo) 48 r h + 2 minαo+αu,βo+βu)+3 r h and continue by giving the following upper bound r m = t 7 + t 8 ) t 7 + t 8 ) 2 minαo,βo)+4 r h + r h )) 2 minαo,βo) 48 r h + 2 minαo+αu,βo+βu)+3 r h 2 minαo,βu) minαo,βo) minα+αu,βo+βu) minαo,βo) minαo+αu,βo+βu) 50)) 2 minαo,βo)+5 r h This is the maximal overlap bound we were looking for; the proof is therefore finished. Theorem 5.3 Special case of algorithm 5. Add33) Let be a h + a m + a l and b h + b m + b l the triple-double arguments of algorithm 5. Add33 that a h = a m = a l = 0 So the values r h, r m and r l returned will be exactly equal to such r h + r m + r l = b h + b m + b l The values r m and r l will not overlap at all. The overlap of r h and r m must still be evaluated. 22

23 Proof We will suppose that the Add2 procedure is exact for a h = a m = a l = 0 if even we are using its unconditional version. Under this hypothesis, we get thus: r h = 0 + b h ) = b h t = 0 + b h b h = 0 t 2 = b m t 3 = 0 t 7 = 0 + b m ) = b m t 4 = 0 t 6 = 0 b l = b l t 5 = 0 0 = 0 t 8 = 0 b l = b l r m + r l = b m + b l In consequence, the following holds for the values returned: r h + r m + r l = b h + b m + b l Clearly r m and r l do not overlap because the Add2 line assures this property. procedure the algorithm calls at its last 5.2 The addition operator Add233 Let us consider now the addition operator Add233. We will only analyse a simplified case where the arguments of the algorithm verify statically known bounds. Algorithm 5.4 Add233) In: a double-double number a h + a l and a triple-double number b h + b m + b l Out: a triple-double number r h + r m + r l Preconditions on the arguments: Algorithm: b h 2 2 a h a l 2 53 a h b m 2 βo b h b l 2 βu b m r h, t ) Add2 a h, b h ) t 2, t 3 ) Add2 a l, b m ) t 4, t 5 ) Add2 t, t 2 ) t 6 t 3 b l t 7 t 6 t 5 r m, r l ) Add2 t 4, t 7 ) Theorem 5.5 Relative error of algorithm 5.4 Add233) Let be a h + a l and b h + b m + b l the values taken in argument of algorithm 5.4 Add233. Let the preconditions hold for this values. So the following holds for the values returned by the algorithm r h, r m and r l r h + r m + r l = a h + a m + a l ) + b h + b m + b l )) + ε) 23

24 where ε is bounded by ε 2 βo βu βo The values r m and r l will not overlap at all and the overlap of r h and r m will be bounded by: r m 2 γ r h with γ min 45, β o 4, β o + β u 2) Proof We know using the properties of the Add2 procedure that r h + t = a h + b h t 2 + t 3 = a l + b m t 4 + t 5 = t + t 2 r m + r l = t 4 + t 7 Supposing that we dispose already of a term of the following form t 7 = t 5 + t 3 + b l + δ with a bounded δ, we can note that r h + r m + r l = a h + a l ) + b h + b m + b l ) + δ Let us now express t 7 by t 5, t 3 and b l : with ε 2 53 and ε We get in consequence t 7 = t 5 t 6 = t 5 t 3 b l ) = t 5 + t 3 + b l ) + ε )) + ε 2 ) t 7 = t 5 + t 3 + b l + t 3 ε + b l ε + t 5 ε 2 + t 3 ε 2 + b l ε 2 + t 3 ε ε 2 + b l ε ε 2 and we can verify that the following upper bound holds for the absolute error δ: δ = t 3 ε + b l ε + t 5 ε 2 + t 3 ε 2 + b l ε 2 + t 3 ε ε 2 + b l ε ε t b l t b l t b l 2 52 t b l t 5 Let us get now some bounds for t 3, b l and t 5, all as a function of a h : b l 2 βo βu b h 2 βo βu 2 a h which can be obtained using the preconditions hypotheses. Further t t 2 = 2 53 a l + b m ) 2 52 a l + b m 2 52 a l b m 2 05 a h + 2 βo 52 b h 2 05 a h + 2 βo 54 a h 24

25 and finally t t 4 = 2 53 t + t 2 ) 2 52 t + t t t r h a l + b m ) 2 05 a h + b h ) a l + b m 2 04 a h + b h a l b m 2 04 a h a h a h + 2 βo 53 a h a h βo 53) So we have δ a h βo βo βu βo 06) a h 2 βo βu βo ) Let us now give a lower bound for a h + a l ) + b h + b m + b l ) as a function of a h by getting out an upper bound for a l + b h + b m + b l as such a function: a l + b h + b m + b l a l + b h + b m + b l a h βo βo βu 2) Since β o, β u we can check that a l + b h + b m + b l 2 a h In consequence a h + a l + b h + b m + b l ) 2 a h Using this lower bound, we can finally give an upper bound for the relative error ε of the considered procedure: r h + r m + r l = a h + a l ) + b h + b m + b l )) + ε) with ε 2 βo βu βo Last but not least, let us now analyse the additional overlaps generated by the procedure. It is clear that r m and r l do not overlap at all because they are computed by the Add2 procedure. Let us merely examine now the overlap of r h and r m. We begin by giving a lower bound for r h as a function of a h : r h = a h + b h ) a h + b h ) ) 3 4 a h ) 2 a h = 2 a h Let us then find an upper bound for r m using also here a term which is a function of a h : r m = r m + r l ) 25

26 2 r m + r l = 2 t 4 + t 7 2 t t 5 + t 3 + b l + δ 2 t t t b l + 2 δ 2 t 4 + a h βo 52) + a h βo 53) + a h 2 βo βu + a h 2 βo βu βo ) By bounding finally still t 4 by a term that is function of a h we obtain We finally check that we have t 4 = t + t 2 ) 2 t + 2 t r h + 2 a l + b m ) 2 5 a h + b h + 4 a l + b m a h 2 βo ) 2 48 r h a h +2 βo βo βo βo βu +2 βo βu βo ) from which we can deduce the following bound a h βo βo βu) r m r h βo βo βu+) r m 2 γ r h with This finishes the proof. γ min 45, β o 4, β o + β u 2) 6 Triple-double multiplication operators 6. The multiplication procedure Mul23 Let us go on with an analysis of the multiplication procedure Mul23. Algorithm 6. Mul23) In: two double-double numbers a h + a l and b h + b l 26

27 Out: a triple-double number r h + r m + r l Preconditions on the arguments: a l 2 53 a h b l 2 53 b h Algorithm: r h, t ) Mul2 a h, b h ) t 2, t 3 ) Mul2 a h, b l ) t 4, t 5 ) Mul2 a l, b h ) t 6 a l b l t 7, t 8 ) Add22 t 2, t 3, t 4, t 5 ) t 9, t 0 ) Add2 t, t 6 ) r m, r l ) Add22 t 7, t 8, t 9, t 0 ) Theorem 6.2 Relative error of algorithm 6. Mul23) Let be a h + a l and b h + b l the values taken by arguments of algorithm 6. Mul23 So the following holds for the values returned r h, r m and r l : where ε is bounded as follows: r h + r m + r l = a h + a l ) b h + b l )) + ε) ε 2 49 The values returned r m and r l will not overlap at all and the overlap of r h and r m will be bounded as follows: r m 2 48 r h Proof Since algorithm 6. is relatively long, we will proceed by analysing sub-sequences. consider first the following sequence: t 2, t 3 ) Mul2 a h, b l ) t 4, t 5 ) Mul2 a l, b h ) t 7, t 8 ) Add22 t 2, t 3, t 4, t 5 ) So let us Clearly t 7 and t 8 will not overlap. The same way t 2 and t 3 and t 4 and t 5 will not overlap and we know that we have exactly the following egalities Further we can check that t 2 + t 3 = a h b l t 4 + t 5 = b h a l t a h b l ) 2 52 a h b l and similarly So we have on the one side t b h a l 2 53 t 3 + t t t a h b l b h a l 27

28 and on the other 2 02 t 2 + t 3 + t 4 + t b h a l + a h b l Using theorem 4.4 it is possible to note with 2 02 b h a l a h b l t 7 + t 8 = a h b l + a l b h + δ δ 2 02 a h b l a l b h Let us now consider the following sub-sequence of algorithm 6.: r h, t ) Mul2 a h, b h ) t 6 a l b l t 9, t 0 ) Add2 t, t 6 ) Trivially t 9 and t 0 do not overlap. Additionally, one sees that we have exactly r h + t = a h b h and, exactly too, So using where ε 2 53 we get t 9 + t 0 = t + t 6 t 6 = a l b l = a l b l + ε) with r h + t 9 + t 0 = r h + t + t 6 Let us now bound t 9 with regard to a h b h : We have t 9 t + t 6 ) = a h b h + t 6 = a h b h + a l b l + δ 2 δ a l b l t + a l b l )) t a h b h )) 2 53 a h b h a h b h ) 2 5 a h b h With inequalities given, we can bound now the absolute and relative error of algorithm Mul We know already that t 7 + t 8 = a h b l + a l b h + δ where and where δ 2 02 a h b l b h a l r h + t 9 + t 0 = a h b h + a l b l + δ 2 δ a l b l 28

29 One remarks that t t 7 t t 9 and easily checks that and that 2 53 t 0 + t t t t 9 + t 0 + t 7 + t t t 7 So by means of the theorem 4.4, we obtain that r m + r l = t 9 + t 0 + t 7 + t 8 + δ 3 where So finally we get δ t t 7 r h + r m + r l = a h b h + a h b l + a l b h + a l b l + δ where δ = δ + δ 2 + δ 3 And for t 7 we obtain the following inequalities t 7 t 7 + t 8 ) δ + δ 2 + δ a l b h a h b l a l b l a h b h +2 0 t 7 2 t 7 + t 8 2 a h b l + a l b h a l b h a h b l ) 8 a h b l In consequence we can check δ 2 50 a h b h Let us give now an upper bound for a h b l + a l b h + a l b l as a function of a h b h : We have from which we deduce that a h b l + a l b h + a l b l a h b l + a l b h + a l b l 2 5 a h b h a h b h + a h b l + a l b h + a l b l ) a h b h 2 5) 2 a h b h Thus δ 2 49 a h b h + a h b l + a l b h + a l b l 29

30 So we can finally give an upper bound for the relative error ε of the multiplication procedure Mul23 defined by algorithm 6.: r h + r m + r l = a h + a l ) b h + b l ) + ε) with ε 2 49 Before concluding, we must still analyse the overlap of the different components of the tripledouble number returned by the algorithm. It is clear that r m and r l do not overlap because the Add22 brick ensures this. Let us now consider the magnitude of r m with regard to the one of r h. We give first a lower bound for r h : and then an upper bound for r m : r m r m + r l ) t 7 + t 8 + t 9 + t 0 + δ 3 ) r h = a h b h ) a h b h ) 2 a h b h a h b l + a l b h + δ + t 9 + t 0 + δ 3 ) a h b h )) 2 49 a h b h From this we can deduce the final bound r m 2 48 r h 6.2 The multiplication procedure Mul233 Let us concentrate now on the multiplication sequence Mul233. Algorithm 6.3 Mul233) In: a double-double number a h + a l and a triple-double number b h + b m + b l Out: a triple-double number r h + r m + r l Preconditions on the arguments: with Algorithm: a l 2 53 a h b m 2 βo b h b l 2 βu b m β o 2 β u 30

31 r h, t ) Mul2 a h, b h ) t 2, t 3 ) Mul2 a h, b m ) t 4, t 5 ) Mul2 a h, b l ) t 6, t 7 ) Mul2 a l, b h ) t 8, t 9 ) Mul2 a l, b m ) t 0 a l b l t, t 2 ) Add22 t 2, t 3, t 4, t 5 ) t 3, t 4 ) Add22 t 6, t 7, t 8, t 9 ) t 5, t 6 ) Add22 t, t 2, t 3, t 4 ) t 7, t 8 ) Add2 t, t 0 ) r m, r l ) Add22 t 7, t 8, t 5, t 6 ) Theorem 6.4 Relative error of algorithm 6.3 Mul233) Let be a h + a l and b h + b m + b l the values in argument of algorithm 6.3 Mul233 given preconditions hold. So the following will hold for the values r h, r m and r l returned such that the where ε is bounded as follows: r h + r m + r l = a h + a l ) b h + b m + b l )) + ε) ε 2 99 βo βo βu βo+ 2 βo βu βo βo βu The values r m and r l will not overlap at all and the following bound will be verified for the overlap of r h and r m : r m 2 γ r h where γ min 48, β o 4, β o + β u 4) Proof During this proof we will once again proceed by basic bricks that we will assemble in the end. Let us therefore start by the following one: Since we have the exact egalities and t 2, t 3 ) Mul2 a h, b m ) t 4, t 5 ) Mul2 a h, b l ) t, t 2 ) Add22 t 2, t 3, t 4, t 5 ) t 2 + t 3 = a h b m t 4 + t 5 = a h b l and since we know that t 2 and t 3 and t 4 and 5 do not overlap, it suffices to apply the bound proven at theorem 4.4. So we can check on the one hand and on the other 2 53 t 3 + t t t t t a h b m a h b l 2 05 βo a h b m βo βu a h b l 2 02 t 2 + t 3 + t 4 + t 5 = 2 02 a h b m + a h b l 2 02 a h b m a h b l 2 02 βo a h b h βo βu a h b l 3

32 In consequence, using the mentioned theorem, we obtain with t + t 2 = a h b m + a h b l + δ δ 2 02 βo a h b h βo βu a h b l Let us continue with the following part of the algorithm: We have and So we get with t 6, t 7 ) Mul2 a l, b h ) t 8, t 9 ) Mul2 a l, b m ) t 3, t 4 ) Add22 t 6, t 7, t 8, t 9 ) 2 53 t 7 + t t t t t a l b h a l b m 2 58 a h b h βo a h b h 2 02 t 6 + t 7 + t 8 + t 9 = 2 02 a l b h + a l b m 2 02 a l b h a l b m 2 55 a h b h βo a h b h t 3 + t 4 = a l b h + a l b m + δ 2 δ a h b h βo a h b h Let us now consider the brick that produces t 5 and t 6 out of the values in argument. By the properties of the Add22 procedure, t and t 2 and t 3 and t 4 do not overlap at all and verify thus the preconditions of the next Add22 brick that will compute t 5 and t 6. So it suffices to apply once again the absolute error bound of this procedure for obtaining with δ 3 which remains to be estimated. So we have on the one hand t 5 + t 6 = t + t 2 + t 3 + t 4 + δ t 2 + t t t 4 which is an upper bound that can still be estimated by t = t + t 2 ) t + t 2 ) ) 2 t + t 2 2 a h b m + a h b l + δ 2 06 t t 3 2 a h b m + a h b l + δ ) 2 2 βo a h b h + 2 βo βu a h b h + 2 βo 02 a h b h + 2 βo βu 02 a h b h ) a h b h 2 βo βo βu+2) 32

33 which means, using also the following inequalities that t 3 = t 3 + t 4 ) 2 t 3 + t 4 2 a l b h + a l b m + δ 2 2 a l b h + a l b m + δ 2 ) a h b h βo a h b h a h b h βo a h b h ) 2 50 a h b h we can finally check that we have on the one side And on the other 2 53 t 2 + t 4 a h b h 2 βo βo βu ) 2 02 t + t 2 + t 3 + t a h b m + a h b l + a l b h + a l b m + δ + δ a h b h 2 β o So we know that with With this result we can note now with +2 βo βu βo βo βo βu βo 55) a h b h 2 βo βo βu ) t 5 + t 6 = t + t 2 + t 3 + t 4 + δ 3 δ 3 a h b h 2 βo βo βu ) t 5 + t 6 = a h b m + a h b l + a l b h + a l b m + δ 4 δ 4 a h b h 2 β o βo βu βo βo 0 +2 βo βu 0) a h b h 2 βo βo βu ) Let us give now an upper bound for δ 5 defined by the following expression: r m + r l = t + a l b l + t 5 + t 6 + δ 5 33

34 It is clear that t 7 and t 8 do not overlap. In contrast the Add2 operation which adds t to t 0 is necessary because t and t 0 can overlap and even overtake each other: and t 2 06 a h b h t = 0 t 0 2 βo βu 52 a h b h The same argument tells us that the Add2 must be conditional. So we have t 7 + t 8 = t + t 0 and with t 0 = a l b l + δ δ 2 06 βo βu a h b h Let us apply once again the bound for the absolute error of the Add22 procedure: So we have on the one hand We can estimate this by and by t 5 = t 5 + t 6 ) 2 t 5 + t t 8 + t t t 8 t 7 t + t 0 ) 2 t + t 0 2 t + 2 t t t r h + 2 a l b l ) 2 52 a h b h ) a l b l 2 5 a h b h βo βu a h b h 2 a h b m + a h b l + a l b h + a l b m + δ 4 a h b h 2 βo+ + 2 βo βu βo βo βo βu ) a h b h 2 βo βo βu ) So finally, we have on the one hand 2 53 t 8 + t 6 a h b h βo βu βo βo βu ) And on the other a h b h 2 βo βo βu ) 2 02 t 7 + t 8 + t 5 + t t + a l b l + δ + a h b m + a h b l + a l b h +a l b m + δ r h βo βu a h b h +2 βo a h b h +2 βo βu a h b h 34

35 +2 53 a h b h which means that we finally obtain the following βo a h b h βo βu a h b h + a h b h 2 00 βo βo βu )) a h b h 2 0 βo βo βu ) with where Thus we can check that r m + r l = t + a l b l + a h b m + a h b l + a l b h + a l b m + δ 6 δ 6 δ 4 + δ 5 δ 5 a h b h 2 0 βo βo βu ) δ 6 a h b h 2 00 βo βo βu βo βo βu ) a h b h 2 99 βo βo βu ) Let us now integrate the different intermediate results: Since we know that the following egality is exact we can check that r h + t = a h b h r h + r m + r l = a h + a l ) b h + b m + b l ) + δ 6 We continue by giving a lower bound for a h + a l ) b h + b m + b l ) using a term which is a function of a h b h. We do so for being able to give a relative error bound. We first bound by such a term. We have a h b m + a h b l + a l b h + a l b m + a l b l a h b m + a h b l + a l b h + a l b m + a l b l a h b m + a h b l + a l b h + a l b m + a l b l a h b h 2 βo + 2 βo βu βo βo 53) and we get 2 βo+ a h b h + 2 βo βu+ a h b h a h b h a h + a l ) b h + b m + b l ) a h b h βo+ 2 βo βu+) from which we deduce since β o 2, β u ) a h b h βo+ 2 βo βu+ a h + a l ) b h + b m + b l ) Using this inequality we can finally give a bound for the relative error ε as follows: r h + r m + r l = a h + a l ) b h + b m + b l ) + ε) 35

36 with ε 2 99 βo βo βu βo+ 2 βo βu+ Let us recall that for this inequality, β o 2, β u must hold which is the case. It is certainly possible to estimate ε by a term which is slightly less exact: because for β o 2, β u. ε 2 97 βo βo βu βo+ 2 βo βu+ 4 In order to finish this proof, we must still give an upper bound for the maximal overlap generated by the algorithm 6.3 Mul233. Clearly r m and r l do not overlap because of the properties of the basic brick Add22. Let us give an upper bound for the overlap between r h and r m giving a term of the following form: r m 2 γ r h where we constate a lower bound for γ using a term in β o and β u. Let us start by giving a lower bound for r h as a function of a h b h. We have r h = a h b h ) 2 a h b h Then, let us give an upper bound for r m using a function of a h b h : This implies that r m r m + r l ) 2 r m + r l 2 t + a l b l + a h b m + a h b l + a l b h + a l b m + δ 6 2 a h b h βo βu βo + 2 βo βu βo βo βo βu ) a h b h βo βo βu+2) r m 2 r h βo βo βu+2) r h βo βo βu+3) From which we can deduce with r m 2 γ r h γ min 48, β o 4, β o β u 4) This result finishes the proof. 36

3. Mathematical Induction

3. Mathematical Induction 3. MATHEMATICAL INDUCTION 83 3. Mathematical Induction 3.1. First Principle of Mathematical Induction. Let P (n) be a predicate with domain of discourse (over) the natural numbers N = {0, 1,,...}. If (1)

More information

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012 Binary numbers The reason humans represent numbers using decimal (the ten digits from 0,1,... 9) is that we have ten fingers. There is no other reason than that. There is nothing special otherwise about

More information

1. Give the 16 bit signed (twos complement) representation of the following decimal numbers, and convert to hexadecimal:

1. Give the 16 bit signed (twos complement) representation of the following decimal numbers, and convert to hexadecimal: Exercises 1 - number representations Questions 1. Give the 16 bit signed (twos complement) representation of the following decimal numbers, and convert to hexadecimal: (a) 3012 (b) - 435 2. For each of

More information

CHAPTER 5 Round-off errors

CHAPTER 5 Round-off errors CHAPTER 5 Round-off errors In the two previous chapters we have seen how numbers can be represented in the binary numeral system and how this is the basis for representing numbers in computers. Since any

More information

Binary Number System. 16. Binary Numbers. Base 10 digits: 0 1 2 3 4 5 6 7 8 9. Base 2 digits: 0 1

Binary Number System. 16. Binary Numbers. Base 10 digits: 0 1 2 3 4 5 6 7 8 9. Base 2 digits: 0 1 Binary Number System 1 Base 10 digits: 0 1 2 3 4 5 6 7 8 9 Base 2 digits: 0 1 Recall that in base 10, the digits of a number are just coefficients of powers of the base (10): 417 = 4 * 10 2 + 1 * 10 1

More information

The last three chapters introduced three major proof techniques: direct,

The last three chapters introduced three major proof techniques: direct, CHAPTER 7 Proving Non-Conditional Statements The last three chapters introduced three major proof techniques: direct, contrapositive and contradiction. These three techniques are used to prove statements

More information

CS 103X: Discrete Structures Homework Assignment 3 Solutions

CS 103X: Discrete Structures Homework Assignment 3 Solutions CS 103X: Discrete Structures Homework Assignment 3 s Exercise 1 (20 points). On well-ordering and induction: (a) Prove the induction principle from the well-ordering principle. (b) Prove the well-ordering

More information

Real Roots of Univariate Polynomials with Real Coefficients

Real Roots of Univariate Polynomials with Real Coefficients Real Roots of Univariate Polynomials with Real Coefficients mostly written by Christina Hewitt March 22, 2012 1 Introduction Polynomial equations are used throughout mathematics. When solving polynomials

More information

8 Divisibility and prime numbers

8 Divisibility and prime numbers 8 Divisibility and prime numbers 8.1 Divisibility In this short section we extend the concept of a multiple from the natural numbers to the integers. We also summarize several other terms that express

More information

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products Chapter 3 Cartesian Products and Relations The material in this chapter is the first real encounter with abstraction. Relations are very general thing they are a special type of subset. After introducing

More information

HOMEWORK 5 SOLUTIONS. n!f n (1) lim. ln x n! + xn x. 1 = G n 1 (x). (2) k + 1 n. (n 1)!

HOMEWORK 5 SOLUTIONS. n!f n (1) lim. ln x n! + xn x. 1 = G n 1 (x). (2) k + 1 n. (n 1)! Math 7 Fall 205 HOMEWORK 5 SOLUTIONS Problem. 2008 B2 Let F 0 x = ln x. For n 0 and x > 0, let F n+ x = 0 F ntdt. Evaluate n!f n lim n ln n. By directly computing F n x for small n s, we obtain the following

More information

Lecture 3: Finding integer solutions to systems of linear equations

Lecture 3: Finding integer solutions to systems of linear equations Lecture 3: Finding integer solutions to systems of linear equations Algorithmic Number Theory (Fall 2014) Rutgers University Swastik Kopparty Scribe: Abhishek Bhrushundi 1 Overview The goal of this lecture

More information

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1. MATH10212 Linear Algebra Textbook: D. Poole, Linear Algebra: A Modern Introduction. Thompson, 2006. ISBN 0-534-40596-7. Systems of Linear Equations Definition. An n-dimensional vector is a row or a column

More information

Mathematical Induction

Mathematical Induction Mathematical Induction (Handout March 8, 01) The Principle of Mathematical Induction provides a means to prove infinitely many statements all at once The principle is logical rather than strictly mathematical,

More information

MATH10040 Chapter 2: Prime and relatively prime numbers

MATH10040 Chapter 2: Prime and relatively prime numbers MATH10040 Chapter 2: Prime and relatively prime numbers Recall the basic definition: 1. Prime numbers Definition 1.1. Recall that a positive integer is said to be prime if it has precisely two positive

More information

The Goldberg Rao Algorithm for the Maximum Flow Problem

The Goldberg Rao Algorithm for the Maximum Flow Problem The Goldberg Rao Algorithm for the Maximum Flow Problem COS 528 class notes October 18, 2006 Scribe: Dávid Papp Main idea: use of the blocking flow paradigm to achieve essentially O(min{m 2/3, n 1/2 }

More information

TAKE-AWAY GAMES. ALLEN J. SCHWENK California Institute of Technology, Pasadena, California INTRODUCTION

TAKE-AWAY GAMES. ALLEN J. SCHWENK California Institute of Technology, Pasadena, California INTRODUCTION TAKE-AWAY GAMES ALLEN J. SCHWENK California Institute of Technology, Pasadena, California L INTRODUCTION Several games of Tf take-away?f have become popular. The purpose of this paper is to determine the

More information

Partial Fractions. Combining fractions over a common denominator is a familiar operation from algebra:

Partial Fractions. Combining fractions over a common denominator is a familiar operation from algebra: Partial Fractions Combining fractions over a common denominator is a familiar operation from algebra: From the standpoint of integration, the left side of Equation 1 would be much easier to work with than

More information

8 Square matrices continued: Determinants

8 Square matrices continued: Determinants 8 Square matrices continued: Determinants 8. Introduction Determinants give us important information about square matrices, and, as we ll soon see, are essential for the computation of eigenvalues. You

More information

Continued Fractions and the Euclidean Algorithm

Continued Fractions and the Euclidean Algorithm Continued Fractions and the Euclidean Algorithm Lecture notes prepared for MATH 326, Spring 997 Department of Mathematics and Statistics University at Albany William F Hammond Table of Contents Introduction

More information

Section 4.2: The Division Algorithm and Greatest Common Divisors

Section 4.2: The Division Algorithm and Greatest Common Divisors Section 4.2: The Division Algorithm and Greatest Common Divisors The Division Algorithm The Division Algorithm is merely long division restated as an equation. For example, the division 29 r. 20 32 948

More information

Page 331, 38.4 Suppose a is a positive integer and p is a prime. Prove that p a if and only if the prime factorization of a contains p.

Page 331, 38.4 Suppose a is a positive integer and p is a prime. Prove that p a if and only if the prime factorization of a contains p. Page 331, 38.2 Assignment #11 Solutions Factor the following positive integers into primes. a. 25 = 5 2. b. 4200 = 2 3 3 5 2 7. c. 10 10 = 2 10 5 10. d. 19 = 19. e. 1 = 1. Page 331, 38.4 Suppose a is a

More information

1 if 1 x 0 1 if 0 x 1

1 if 1 x 0 1 if 0 x 1 Chapter 3 Continuity In this chapter we begin by defining the fundamental notion of continuity for real valued functions of a single real variable. When trying to decide whether a given function is or

More information

CONTINUED FRACTIONS AND PELL S EQUATION. Contents 1. Continued Fractions 1 2. Solution to Pell s Equation 9 References 12

CONTINUED FRACTIONS AND PELL S EQUATION. Contents 1. Continued Fractions 1 2. Solution to Pell s Equation 9 References 12 CONTINUED FRACTIONS AND PELL S EQUATION SEUNG HYUN YANG Abstract. In this REU paper, I will use some important characteristics of continued fractions to give the complete set of solutions to Pell s equation.

More information

Tiers, Preference Similarity, and the Limits on Stable Partners

Tiers, Preference Similarity, and the Limits on Stable Partners Tiers, Preference Similarity, and the Limits on Stable Partners KANDORI, Michihiro, KOJIMA, Fuhito, and YASUDA, Yosuke February 7, 2010 Preliminary and incomplete. Do not circulate. Abstract We consider

More information

Example 1. Consider the following two portfolios: 2. Buy one c(s(t), 20, τ, r) and sell one c(s(t), 10, τ, r).

Example 1. Consider the following two portfolios: 2. Buy one c(s(t), 20, τ, r) and sell one c(s(t), 10, τ, r). Chapter 4 Put-Call Parity 1 Bull and Bear Financial analysts use words such as bull and bear to describe the trend in stock markets. Generally speaking, a bull market is characterized by rising prices.

More information

Math 319 Problem Set #3 Solution 21 February 2002

Math 319 Problem Set #3 Solution 21 February 2002 Math 319 Problem Set #3 Solution 21 February 2002 1. ( 2.1, problem 15) Find integers a 1, a 2, a 3, a 4, a 5 such that every integer x satisfies at least one of the congruences x a 1 (mod 2), x a 2 (mod

More information

The Prime Numbers. Definition. A prime number is a positive integer with exactly two positive divisors.

The Prime Numbers. Definition. A prime number is a positive integer with exactly two positive divisors. The Prime Numbers Before starting our study of primes, we record the following important lemma. Recall that integers a, b are said to be relatively prime if gcd(a, b) = 1. Lemma (Euclid s Lemma). If gcd(a,

More information

Row Echelon Form and Reduced Row Echelon Form

Row Echelon Form and Reduced Row Echelon Form These notes closely follow the presentation of the material given in David C Lay s textbook Linear Algebra and its Applications (3rd edition) These notes are intended primarily for in-class presentation

More information

So let us begin our quest to find the holy grail of real analysis.

So let us begin our quest to find the holy grail of real analysis. 1 Section 5.2 The Complete Ordered Field: Purpose of Section We present an axiomatic description of the real numbers as a complete ordered field. The axioms which describe the arithmetic of the real numbers

More information

1.7 Graphs of Functions

1.7 Graphs of Functions 64 Relations and Functions 1.7 Graphs of Functions In Section 1.4 we defined a function as a special type of relation; one in which each x-coordinate was matched with only one y-coordinate. We spent most

More information

6.852: Distributed Algorithms Fall, 2009. Class 2

6.852: Distributed Algorithms Fall, 2009. Class 2 .8: Distributed Algorithms Fall, 009 Class Today s plan Leader election in a synchronous ring: Lower bound for comparison-based algorithms. Basic computation in general synchronous networks: Leader election

More information

8 Primes and Modular Arithmetic

8 Primes and Modular Arithmetic 8 Primes and Modular Arithmetic 8.1 Primes and Factors Over two millennia ago already, people all over the world were considering the properties of numbers. One of the simplest concepts is prime numbers.

More information

Vector and Matrix Norms

Vector and Matrix Norms Chapter 1 Vector and Matrix Norms 11 Vector Spaces Let F be a field (such as the real numbers, R, or complex numbers, C) with elements called scalars A Vector Space, V, over the field F is a non-empty

More information

The Mean Value Theorem

The Mean Value Theorem The Mean Value Theorem THEOREM (The Extreme Value Theorem): If f is continuous on a closed interval [a, b], then f attains an absolute maximum value f(c) and an absolute minimum value f(d) at some numbers

More information

Chapter 11 Number Theory

Chapter 11 Number Theory Chapter 11 Number Theory Number theory is one of the oldest branches of mathematics. For many years people who studied number theory delighted in its pure nature because there were few practical applications

More information

26 Integers: Multiplication, Division, and Order

26 Integers: Multiplication, Division, and Order 26 Integers: Multiplication, Division, and Order Integer multiplication and division are extensions of whole number multiplication and division. In multiplying and dividing integers, the one new issue

More information

Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan

Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan 3 Binary Operations We are used to addition and multiplication of real numbers. These operations combine two real numbers

More information

Handout #1: Mathematical Reasoning

Handout #1: Mathematical Reasoning Math 101 Rumbos Spring 2010 1 Handout #1: Mathematical Reasoning 1 Propositional Logic A proposition is a mathematical statement that it is either true or false; that is, a statement whose certainty or

More information

This Unit: Floating Point Arithmetic. CIS 371 Computer Organization and Design. Readings. Floating Point (FP) Numbers

This Unit: Floating Point Arithmetic. CIS 371 Computer Organization and Design. Readings. Floating Point (FP) Numbers This Unit: Floating Point Arithmetic CIS 371 Computer Organization and Design Unit 7: Floating Point App App App System software Mem CPU I/O Formats Precision and range IEEE 754 standard Operations Addition

More information

7 Gaussian Elimination and LU Factorization

7 Gaussian Elimination and LU Factorization 7 Gaussian Elimination and LU Factorization In this final section on matrix factorization methods for solving Ax = b we want to take a closer look at Gaussian elimination (probably the best known method

More information

CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs

CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs CHAPTER 3 Methods of Proofs 1. Logical Arguments and Formal Proofs 1.1. Basic Terminology. An axiom is a statement that is given to be true. A rule of inference is a logical rule that is used to deduce

More information

How To Understand The Theory Of Computer Science

How To Understand The Theory Of Computer Science Theory of Computation Lecture Notes Abhijat Vichare August 2005 Contents 1 Introduction 2 What is Computation? 3 The λ Calculus 3.1 Conversions: 3.2 The calculus in use 3.3 Few Important Theorems 3.4 Worked

More information

Correctly Rounded Floating-point Binary-to-Decimal and Decimal-to-Binary Conversion Routines in Standard ML. By Prashanth Tilleti

Correctly Rounded Floating-point Binary-to-Decimal and Decimal-to-Binary Conversion Routines in Standard ML. By Prashanth Tilleti Correctly Rounded Floating-point Binary-to-Decimal and Decimal-to-Binary Conversion Routines in Standard ML By Prashanth Tilleti Advisor Dr. Matthew Fluet Department of Computer Science B. Thomas Golisano

More information

k, then n = p2α 1 1 pα k

k, then n = p2α 1 1 pα k Powers of Integers An integer n is a perfect square if n = m for some integer m. Taking into account the prime factorization, if m = p α 1 1 pα k k, then n = pα 1 1 p α k k. That is, n is a perfect square

More information

Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay

Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay Lecture - 17 Shannon-Fano-Elias Coding and Introduction to Arithmetic Coding

More information

THE DIMENSION OF A VECTOR SPACE

THE DIMENSION OF A VECTOR SPACE THE DIMENSION OF A VECTOR SPACE KEITH CONRAD This handout is a supplementary discussion leading up to the definition of dimension and some of its basic properties. Let V be a vector space over a field

More information

Cartesian Products and Relations

Cartesian Products and Relations Cartesian Products and Relations Definition (Cartesian product) If A and B are sets, the Cartesian product of A and B is the set A B = {(a, b) :(a A) and (b B)}. The following points are worth special

More information

Sample Induction Proofs

Sample Induction Proofs Math 3 Worksheet: Induction Proofs III, Sample Proofs A.J. Hildebrand Sample Induction Proofs Below are model solutions to some of the practice problems on the induction worksheets. The solutions given

More information

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2 CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2 Proofs Intuitively, the concept of proof should already be familiar We all like to assert things, and few of us

More information

Basic Proof Techniques

Basic Proof Techniques Basic Proof Techniques David Ferry dsf43@truman.edu September 13, 010 1 Four Fundamental Proof Techniques When one wishes to prove the statement P Q there are four fundamental approaches. This document

More information

36 CHAPTER 1. LIMITS AND CONTINUITY. Figure 1.17: At which points is f not continuous?

36 CHAPTER 1. LIMITS AND CONTINUITY. Figure 1.17: At which points is f not continuous? 36 CHAPTER 1. LIMITS AND CONTINUITY 1.3 Continuity Before Calculus became clearly de ned, continuity meant that one could draw the graph of a function without having to lift the pen and pencil. While this

More information

x a x 2 (1 + x 2 ) n.

x a x 2 (1 + x 2 ) n. Limits and continuity Suppose that we have a function f : R R. Let a R. We say that f(x) tends to the limit l as x tends to a; lim f(x) = l ; x a if, given any real number ɛ > 0, there exists a real number

More information

How To Know If A Domain Is Unique In An Octempo (Euclidean) Or Not (Ecl)

How To Know If A Domain Is Unique In An Octempo (Euclidean) Or Not (Ecl) Subsets of Euclidean domains possessing a unique division algorithm Andrew D. Lewis 2009/03/16 Abstract Subsets of a Euclidean domain are characterised with the following objectives: (1) ensuring uniqueness

More information

Solution for Homework 2

Solution for Homework 2 Solution for Homework 2 Problem 1 a. What is the minimum number of bits that are required to uniquely represent the characters of English alphabet? (Consider upper case characters alone) The number of

More information

arxiv:1112.0829v1 [math.pr] 5 Dec 2011

arxiv:1112.0829v1 [math.pr] 5 Dec 2011 How Not to Win a Million Dollars: A Counterexample to a Conjecture of L. Breiman Thomas P. Hayes arxiv:1112.0829v1 [math.pr] 5 Dec 2011 Abstract Consider a gambling game in which we are allowed to repeatedly

More information

Sensitivity Analysis 3.1 AN EXAMPLE FOR ANALYSIS

Sensitivity Analysis 3.1 AN EXAMPLE FOR ANALYSIS Sensitivity Analysis 3 We have already been introduced to sensitivity analysis in Chapter via the geometry of a simple example. We saw that the values of the decision variables and those of the slack and

More information

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES I GROUPS: BASIC DEFINITIONS AND EXAMPLES Definition 1: An operation on a set G is a function : G G G Definition 2: A group is a set G which is equipped with an operation and a special element e G, called

More information

Every Positive Integer is the Sum of Four Squares! (and other exciting problems)

Every Positive Integer is the Sum of Four Squares! (and other exciting problems) Every Positive Integer is the Sum of Four Squares! (and other exciting problems) Sophex University of Texas at Austin October 18th, 00 Matilde N. Lalín 1. Lagrange s Theorem Theorem 1 Every positive integer

More information

v w is orthogonal to both v and w. the three vectors v, w and v w form a right-handed set of vectors.

v w is orthogonal to both v and w. the three vectors v, w and v w form a right-handed set of vectors. 3. Cross product Definition 3.1. Let v and w be two vectors in R 3. The cross product of v and w, denoted v w, is the vector defined as follows: the length of v w is the area of the parallelogram with

More information

1. The Fly In The Ointment

1. The Fly In The Ointment Arithmetic Revisited Lesson 5: Decimal Fractions or Place Value Extended Part 5: Dividing Decimal Fractions, Part 2. The Fly In The Ointment The meaning of, say, ƒ 2 doesn't depend on whether we represent

More information

CHAPTER 2. Logic. 1. Logic Definitions. Notation: Variables are used to represent propositions. The most common variables used are p, q, and r.

CHAPTER 2. Logic. 1. Logic Definitions. Notation: Variables are used to represent propositions. The most common variables used are p, q, and r. CHAPTER 2 Logic 1. Logic Definitions 1.1. Propositions. Definition 1.1.1. A proposition is a declarative sentence that is either true (denoted either T or 1) or false (denoted either F or 0). Notation:

More information

CONTINUED FRACTIONS AND FACTORING. Niels Lauritzen

CONTINUED FRACTIONS AND FACTORING. Niels Lauritzen CONTINUED FRACTIONS AND FACTORING Niels Lauritzen ii NIELS LAURITZEN DEPARTMENT OF MATHEMATICAL SCIENCES UNIVERSITY OF AARHUS, DENMARK EMAIL: niels@imf.au.dk URL: http://home.imf.au.dk/niels/ Contents

More information

Mathematical Induction

Mathematical Induction Mathematical Induction In logic, we often want to prove that every member of an infinite set has some feature. E.g., we would like to show: N 1 : is a number 1 : has the feature Φ ( x)(n 1 x! 1 x) How

More information

PUTNAM TRAINING POLYNOMIALS. Exercises 1. Find a polynomial with integral coefficients whose zeros include 2 + 5.

PUTNAM TRAINING POLYNOMIALS. Exercises 1. Find a polynomial with integral coefficients whose zeros include 2 + 5. PUTNAM TRAINING POLYNOMIALS (Last updated: November 17, 2015) Remark. This is a list of exercises on polynomials. Miguel A. Lerma Exercises 1. Find a polynomial with integral coefficients whose zeros include

More information

Set theory as a foundation for mathematics

Set theory as a foundation for mathematics V I I I : Set theory as a foundation for mathematics This material is basically supplementary, and it was not covered in the course. In the first section we discuss the basic axioms of set theory and the

More information

Math 120 Final Exam Practice Problems, Form: A

Math 120 Final Exam Practice Problems, Form: A Math 120 Final Exam Practice Problems, Form: A Name: While every attempt was made to be complete in the types of problems given below, we make no guarantees about the completeness of the problems. Specifically,

More information

RN-coding of Numbers: New Insights and Some Applications

RN-coding of Numbers: New Insights and Some Applications RN-coding of Numbers: New Insights and Some Applications Peter Kornerup Dept. of Mathematics and Computer Science SDU, Odense, Denmark & Jean-Michel Muller LIP/Arénaire (CRNS-ENS Lyon-INRIA-UCBL) Lyon,

More information

Lecture 1: Course overview, circuits, and formulas

Lecture 1: Course overview, circuits, and formulas Lecture 1: Course overview, circuits, and formulas Topics in Complexity Theory and Pseudorandomness (Spring 2013) Rutgers University Swastik Kopparty Scribes: John Kim, Ben Lund 1 Course Information Swastik

More information

Formal Languages and Automata Theory - Regular Expressions and Finite Automata -

Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Samarjit Chakraborty Computer Engineering and Networks Laboratory Swiss Federal Institute of Technology (ETH) Zürich March

More information

MATH 289 PROBLEM SET 4: NUMBER THEORY

MATH 289 PROBLEM SET 4: NUMBER THEORY MATH 289 PROBLEM SET 4: NUMBER THEORY 1. The greatest common divisor If d and n are integers, then we say that d divides n if and only if there exists an integer q such that n = qd. Notice that if d divides

More information

Lies My Calculator and Computer Told Me

Lies My Calculator and Computer Told Me Lies My Calculator and Computer Told Me 2 LIES MY CALCULATOR AND COMPUTER TOLD ME Lies My Calculator and Computer Told Me See Section.4 for a discussion of graphing calculators and computers with graphing

More information

Lecture 13 - Basic Number Theory.

Lecture 13 - Basic Number Theory. Lecture 13 - Basic Number Theory. Boaz Barak March 22, 2010 Divisibility and primes Unless mentioned otherwise throughout this lecture all numbers are non-negative integers. We say that A divides B, denoted

More information

Pigeonhole Principle Solutions

Pigeonhole Principle Solutions Pigeonhole Principle Solutions 1. Show that if we take n + 1 numbers from the set {1, 2,..., 2n}, then some pair of numbers will have no factors in common. Solution: Note that consecutive numbers (such

More information

Section 1.3 P 1 = 1 2. = 1 4 2 8. P n = 1 P 3 = Continuing in this fashion, it should seem reasonable that, for any n = 1, 2, 3,..., = 1 2 4.

Section 1.3 P 1 = 1 2. = 1 4 2 8. P n = 1 P 3 = Continuing in this fashion, it should seem reasonable that, for any n = 1, 2, 3,..., = 1 2 4. Difference Equations to Differential Equations Section. The Sum of a Sequence This section considers the problem of adding together the terms of a sequence. Of course, this is a problem only if more than

More information

The Fundamental Theorem of Arithmetic

The Fundamental Theorem of Arithmetic The Fundamental Theorem of Arithmetic 1 Introduction: Why this theorem? Why this proof? One of the purposes of this course 1 is to train you in the methods mathematicians use to prove mathematical statements,

More information

SYSTEMS OF EQUATIONS AND MATRICES WITH THE TI-89. by Joseph Collison

SYSTEMS OF EQUATIONS AND MATRICES WITH THE TI-89. by Joseph Collison SYSTEMS OF EQUATIONS AND MATRICES WITH THE TI-89 by Joseph Collison Copyright 2000 by Joseph Collison All rights reserved Reproduction or translation of any part of this work beyond that permitted by Sections

More information

MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.436J/15.085J Fall 2008 Lecture 5 9/17/2008 RANDOM VARIABLES

MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.436J/15.085J Fall 2008 Lecture 5 9/17/2008 RANDOM VARIABLES MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.436J/15.085J Fall 2008 Lecture 5 9/17/2008 RANDOM VARIABLES Contents 1. Random variables and measurable functions 2. Cumulative distribution functions 3. Discrete

More information

Increasing for all. Convex for all. ( ) Increasing for all (remember that the log function is only defined for ). ( ) Concave for all.

Increasing for all. Convex for all. ( ) Increasing for all (remember that the log function is only defined for ). ( ) Concave for all. 1. Differentiation The first derivative of a function measures by how much changes in reaction to an infinitesimal shift in its argument. The largest the derivative (in absolute value), the faster is evolving.

More information

Section 4.4 Inner Product Spaces

Section 4.4 Inner Product Spaces Section 4.4 Inner Product Spaces In our discussion of vector spaces the specific nature of F as a field, other than the fact that it is a field, has played virtually no role. In this section we no longer

More information

Kevin James. MTHSC 412 Section 2.4 Prime Factors and Greatest Comm

Kevin James. MTHSC 412 Section 2.4 Prime Factors and Greatest Comm MTHSC 412 Section 2.4 Prime Factors and Greatest Common Divisor Greatest Common Divisor Definition Suppose that a, b Z. Then we say that d Z is a greatest common divisor (gcd) of a and b if the following

More information

SHARP BOUNDS FOR THE SUM OF THE SQUARES OF THE DEGREES OF A GRAPH

SHARP BOUNDS FOR THE SUM OF THE SQUARES OF THE DEGREES OF A GRAPH 31 Kragujevac J. Math. 25 (2003) 31 49. SHARP BOUNDS FOR THE SUM OF THE SQUARES OF THE DEGREES OF A GRAPH Kinkar Ch. Das Department of Mathematics, Indian Institute of Technology, Kharagpur 721302, W.B.,

More information

4. Continuous Random Variables, the Pareto and Normal Distributions

4. Continuous Random Variables, the Pareto and Normal Distributions 4. Continuous Random Variables, the Pareto and Normal Distributions A continuous random variable X can take any value in a given range (e.g. height, weight, age). The distribution of a continuous random

More information

Fibonacci Numbers and Greatest Common Divisors. The Finonacci numbers are the numbers in the sequence 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144,...

Fibonacci Numbers and Greatest Common Divisors. The Finonacci numbers are the numbers in the sequence 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144,... Fibonacci Numbers and Greatest Common Divisors The Finonacci numbers are the numbers in the sequence 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144,.... After starting with two 1s, we get each Fibonacci number

More information

7.6 Approximation Errors and Simpson's Rule

7.6 Approximation Errors and Simpson's Rule WileyPLUS: Home Help Contact us Logout Hughes-Hallett, Calculus: Single and Multivariable, 4/e Calculus I, II, and Vector Calculus Reading content Integration 7.1. Integration by Substitution 7.2. Integration

More information

Follow links for Class Use and other Permissions. For more information send email to: permissions@pupress.princeton.edu

Follow links for Class Use and other Permissions. For more information send email to: permissions@pupress.princeton.edu COPYRIGHT NOTICE: Ariel Rubinstein: Lecture Notes in Microeconomic Theory is published by Princeton University Press and copyrighted, c 2006, by Princeton University Press. All rights reserved. No part

More information

An example of a computable

An example of a computable An example of a computable absolutely normal number Verónica Becher Santiago Figueira Abstract The first example of an absolutely normal number was given by Sierpinski in 96, twenty years before the concept

More information

CONTRIBUTIONS TO ZERO SUM PROBLEMS

CONTRIBUTIONS TO ZERO SUM PROBLEMS CONTRIBUTIONS TO ZERO SUM PROBLEMS S. D. ADHIKARI, Y. G. CHEN, J. B. FRIEDLANDER, S. V. KONYAGIN AND F. PAPPALARDI Abstract. A prototype of zero sum theorems, the well known theorem of Erdős, Ginzburg

More information

CHAPTER 9. Integer Programming

CHAPTER 9. Integer Programming CHAPTER 9 Integer Programming An integer linear program (ILP) is, by definition, a linear program with the additional constraint that all variables take integer values: (9.1) max c T x s t Ax b and x integral

More information

Factoring & Primality

Factoring & Primality Factoring & Primality Lecturer: Dimitris Papadopoulos In this lecture we will discuss the problem of integer factorization and primality testing, two problems that have been the focus of a great amount

More information

On the largest prime factor of x 2 1

On the largest prime factor of x 2 1 On the largest prime factor of x 2 1 Florian Luca and Filip Najman Abstract In this paper, we find all integers x such that x 2 1 has only prime factors smaller than 100. This gives some interesting numerical

More information

Product irregularity strength of certain graphs

Product irregularity strength of certain graphs Also available at http://amc.imfm.si ISSN 1855-3966 (printed edn.), ISSN 1855-3974 (electronic edn.) ARS MATHEMATICA CONTEMPORANEA 7 (014) 3 9 Product irregularity strength of certain graphs Marcin Anholcer

More information

Midterm Practice Problems

Midterm Practice Problems 6.042/8.062J Mathematics for Computer Science October 2, 200 Tom Leighton, Marten van Dijk, and Brooke Cowan Midterm Practice Problems Problem. [0 points] In problem set you showed that the nand operator

More information

def: An axiom is a statement that is assumed to be true, or in the case of a mathematical system, is used to specify the system.

def: An axiom is a statement that is assumed to be true, or in the case of a mathematical system, is used to specify the system. Section 1.5 Methods of Proof 1.5.1 1.5 METHODS OF PROOF Some forms of argument ( valid ) never lead from correct statements to an incorrect. Some other forms of argument ( fallacies ) can lead from true

More information

INCIDENCE-BETWEENNESS GEOMETRY

INCIDENCE-BETWEENNESS GEOMETRY INCIDENCE-BETWEENNESS GEOMETRY MATH 410, CSUSM. SPRING 2008. PROFESSOR AITKEN This document covers the geometry that can be developed with just the axioms related to incidence and betweenness. The full

More information

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics Undergraduate Notes in Mathematics Arkansas Tech University Department of Mathematics An Introductory Single Variable Real Analysis: A Learning Approach through Problem Solving Marcel B. Finan c All Rights

More information

Multi-variable Calculus and Optimization

Multi-variable Calculus and Optimization Multi-variable Calculus and Optimization Dudley Cooke Trinity College Dublin Dudley Cooke (Trinity College Dublin) Multi-variable Calculus and Optimization 1 / 51 EC2040 Topic 3 - Multi-variable Calculus

More information

Quotient Rings and Field Extensions

Quotient Rings and Field Extensions Chapter 5 Quotient Rings and Field Extensions In this chapter we describe a method for producing field extension of a given field. If F is a field, then a field extension is a field K that contains F.

More information

LEARNING OBJECTIVES FOR THIS CHAPTER

LEARNING OBJECTIVES FOR THIS CHAPTER CHAPTER 2 American mathematician Paul Halmos (1916 2006), who in 1942 published the first modern linear algebra book. The title of Halmos s book was the same as the title of this chapter. Finite-Dimensional

More information