Computation of dot products in finite fields with floating-point arithmetic
|
|
- Virginia Ray
- 5 years ago
- Views:
Transcription
1 Computation of dot products in finite fields with floating-point arithmetic Stef Graillat Joint work with Jérémy Jean LIP6/PEQUAN - Université Pierre et Marie Curie (Paris 6) - CNRS Computer-assisted proofs - tools, methods and applications Dagstuhl Seminar Germany, November 15-20, 2009 S. Graillat (Univ. Paris 6) Dot products in finite fields 1 / 36
2 Outline of the talk Motivations Basic Floating-point arithmetic Finite fields Computation of dot products First method Second method Comparison Conclusion and future work S. Graillat (Univ. Paris 6) Dot products in finite fields 2 / 36
3 Motivations Dot products: key tool in numerical linear algebra Fast algorithms in scientific computing Cryptology Error-correcting codes Computer algebra S. Graillat (Univ. Paris 6) Dot products in finite fields 3 / 36
4 Floating-point numbers Normalized floating-point numbers F R: x = ± x 0.x 1... x }{{ M 1 b e, } 0 x i b 1, x 0 0 mantissa b : basis, M : precision, e : exponent such that e min e e max Approximation of R by F with rounding fl : R F. Let x R then fl(x) = x(1 + δ), δ u Unit rounding u = b 1 M for rounding toward zero S. Graillat (Univ. Paris 6) Dot products in finite fields 4 / 36
5 Standard model of floating-point arithmetic Let x, y F and {+,,, /}. The result x y is not in general a floating-point number fl(x y) = (x y)(1 + δ), δ u IEEE 754 standard (1985) Type Size Mantissa Exponent Unit rounding Interval Single 32 bits 23+1 bits 8 bits u = , ±38 Double 64 bits 52+1 bits 11 bits u = , ±308 S. Graillat (Univ. Paris 6) Dot products in finite fields 5 / 36
6 Finite field F p (p prime) F p = Z/pZ = GF (p) = {0, 1,..., p 1} is a finite field with characteristic p S. Graillat (Univ. Paris 6) Dot products in finite fields 6 / 36
7 Finite field F p (p prime) F p = Z/pZ = GF (p) = {0, 1,..., p 1} is a finite field with characteristic p Operations in the field, for a, b Z/pZ: Addition: a + b {0,..., 2(p 1)} a + b (mod p) Z/pZ Multiplication: ab {0,..., (p 1) 2 } ab (mod p) Z/pZ S. Graillat (Univ. Paris 6) Dot products in finite fields 6 / 36
8 Finite field F p (p prime) F p = Z/pZ = GF (p) = {0, 1,..., p 1} is a finite field with characteristic p Operations in the field, for a, b Z/pZ: Addition: a + b {0,..., 2(p 1)} a + b (mod p) Z/pZ Multiplication: ab {0,..., (p 1) 2 } ab (mod p) Z/pZ Reduction modulo p for a Z/pZ: a a (mod p) = a p = a a.invp p p S. Graillat (Univ. Paris 6) Dot products in finite fields 6 / 36
9 Aim Let p 3 a prime number and (a i ) i, (b i ) i two vectors of N scalars in Z/pZ. We want to compute the dot product of a and b in Z/pZ: a b = N a i b i (mod p) i=1 S. Graillat (Univ. Paris 6) Dot products in finite fields 7 / 36
10 Aim Let p 3 a prime number and (a i ) i, (b i ) i two vectors of N scalars in Z/pZ. We want to compute the dot product of a and b in Z/pZ: a b = N a i b i (mod p) i=1 Assumptions: The integers are stored as floating-point numbers F N The prime p satisfies p 1 < 2 M 1 The numbers are assumed to be nonnegative The rounding mode is rounding toward zero S. Graillat (Univ. Paris 6) Dot products in finite fields 7 / 36
11 Rounding toward zero in R + Let x R + fl(x) be the rounding toward zero of x in F Equivalent to a truncation fl(x) F x F S. Graillat (Univ. Paris 6) Dot products in finite fields 8 / 36
12 Rounding toward zero in R + Let x R + fl(x) be the rounding toward zero of x in F Equivalent to a truncation The rounding is less or equal to the exact number: x R +, fl(x) x fl(x) F x F S. Graillat (Univ. Paris 6) Dot products in finite fields 8 / 36
13 Rounding toward zero in R + Let x R + fl(x) be the rounding toward zero of x in F Equivalent to a truncation The rounding is less or equal to the exact number: The rounding error is nonnegative: x R +, fl(x) x x R +, x fl(x) 0 fl(x) F x F S. Graillat (Univ. Paris 6) Dot products in finite fields 8 / 36
14 Error-free Transformations (EFT) Problem : the result of a floating-point operation is generally not representable by a floating-point numbers. Solution: Error-free transformations non-evaluated sum of two floating-point numbers the floating-point result of the operation the rounding error (which is representable in F in our cases) For a, b F N and {+, }, which is mathematically true. a b = fl(a b) + e, with e F, S. Graillat (Univ. Paris 6) Dot products in finite fields 9 / 36
15 Error-free Transformations for the product (1/2) For a, b, c F, FMA(a, b, c) is the rounding of a b + c Algorithm 1 (EFT for the product of two floating-point numbers) function [x, y] = TwoProductFMA(a, b) x = fl(a b) y = FMA(a, b, x) The FMA is now included in the IEEE standard S. Graillat (Univ. Paris 6) Dot products in finite fields 10 / 36
16 Error-free Transformations for the product (2/2) Theorem 1 Let a, b F N and x, y F such that Then [x, y] TwoProductFMA(a, b) ab = x + y, x = fl(ab), 0 y < u.ufp(x), 0 x ab Algorithm TwoProductFMA requires 2 flops. ab x y 2M M 0 2l l = log 2(p) S. Graillat (Univ. Paris 6) Dot products in finite fields 11 / 36
17 Binary euclidean division (1/2) For a, d F N, d 0, the euclidean division of a by d is a = qd + r, 0 r < d For a F N and σ = 2 k, σ a, one defines Algorithm 2 (Split of a floating-point numbers) function [x, y] = ExtractScalar(σ, a) q = fl(σ + a) x = fl(q σ) y = fl(x a) fl is rounding toward zero Algorithm first proposed by Rump, Ogita and Oishi in rounding to the nearest S. Graillat (Univ. Paris 6) Dot products in finite fields 12 / 36
18 Binary euclidean division (2/2) Theorem 2 Let a F N, σ = 2 k, σ a and x, y F such that [x, y] ExtractScalar(σ, a) Then a = x + y, 0 y < u σ, 0 x a, x uσn Algorithm ExtractScalar requires 3 flops. Remark: a = x + y = x uσ + r, x N, 0 r < uσ q x a y σ = 2 k uσ 0 S. Graillat (Univ. Paris 6) Dot products in finite fields 13 / 36
19 Computation of dot products Two different approaches a b = N a i b i (mod p) i=1 S. Graillat (Univ. Paris 6) Dot products in finite fields 14 / 36
20 Computation of dot products Two different approaches First method: a b = N a i b i (mod p) i=1 λ(p 1) < 2 M 1 with λ N S. Graillat (Univ. Paris 6) Dot products in finite fields 14 / 36
21 Computation of dot products Two different approaches First method: a b = N a i b i (mod p) i=1 λ(p 1) < 2 M 1 with λ N Second method: p 1 < 2 M 1 but N < 2 M/2 In double, the maximal vector size are 2 53/ S. Graillat (Univ. Paris 6) Dot products in finite fields 14 / 36
22 Computation of dot products First method S. Graillat (Univ. Paris 6) Dot products in finite fields 15 / 36
23 Computation of dot products: first method Assumption : λ(p 1) < 2 M 1 Consequences : The sum of λ elements of the field can still be stored in the mantissa We can delay the reduction modulo p up to λ summations S. Graillat (Univ. Paris 6) Dot products in finite fields 16 / 36
24 Computation of dot products: first method Assumption : λ(p 1) < 2 M 1 Consequences : The sum of λ elements of the field can still be stored in the mantissa We can delay the reduction modulo p up to λ summations Jean-Guillaume Dumas: λ(p 1) 2 < 2 M S. Graillat (Univ. Paris 6) Dot products in finite fields 16 / 36
25 First method: principle a i b i a i < 2 l+1 b i < 2 l+1 a i b i 2M M 0 2l l = log 2(p) Let l = log 2 (p) S. Graillat (Univ. Paris 6) Dot products in finite fields 17 / 36
26 First method: principle a i b i a i < 2 l+1 b i < 2 l+1 a i b i 2M M 0 2l l = log 2(p) Let l = log 2 (p) = ufp(p) := 2 l p (ufp(p) =most significant bit of p) S. Graillat (Univ. Paris 6) Dot products in finite fields 17 / 36
27 First method: principle a i b i a i < 2 l+1 b i < 2 l+1 a i b i 2M M 0 2l l = log 2(p) Let l = log 2 (p) = ufp(p) := 2 l p (ufp(p) =most significant bit of p) p 3 prime so: ufp(p) < p < 2.ufp(p) i.e. 2 l < p < 2 l+1 Remarks: x [0, 2 l+1 1] F, { 0 x 2 l = x Z/pZ 2 l < x < 2 l+1 = x 2 l Z/pZ 0 x Z/pZ 2 l x 2 l Z/pZ 2 l+1 0 x 2 l 2 l x < 2 l+1 S. Graillat (Univ. Paris 6) Dot products in finite fields 17 / 36
28 First method: principle TwoProductFMA = a i b i = h + r a i b i 2M M 0 2l + 2 l + 1 = log 2 (p) + 1 S. Graillat (Univ. Paris 6) Dot products in finite fields 18 / 36
29 First method: principle TwoProductFMA = a i b i = h + r h a i b i r 2M M 0 2l + 2 l + 1 = log 2 (p) + 1 S. Graillat (Univ. Paris 6) Dot products in finite fields 18 / 36
30 First method: principle TwoProductFMA = a i b i = h + r α h a i b i β r 2M M 0 2l + 2 l + 1 = log 2 (p) + 1 S. Graillat (Univ. Paris 6) Dot products in finite fields 18 / 36
31 First method: principle TwoProductFMA = a i b i = h + r a i b i α h β r 2M M 0 2l + 2 l + 1 = log 2 (p) + 1 After splitting with ExtractScalar: h = α + β with 0 α/2 l+1, β < 2 l+1 S. Graillat (Univ. Paris 6) Dot products in finite fields 18 / 36
32 First method: principle TwoProductFMA = a i b i = h + r a i b i α h β r 2M M 0 2l + 2 l + 1 = log 2 (p) + 1 After splitting with ExtractScalar: h = α + β with 0 α/2 l+1, β < 2 l+1 We accumulate α/2 l+1 Z/pZ or α/2 l+1 2 l Z/pZ We remember the number n α of added 2 l S. Graillat (Univ. Paris 6) Dot products in finite fields 18 / 36
33 First method: principle TwoProductFMA = a i b i = h + r a i b i α h β r 2M M 0 2l + 2 l + 1 = log 2 (p) + 1 After splitting with ExtractScalar: h = α + β with 0 α/2 l+1, β < 2 l+1 We accumulate α/2 l+1 Z/pZ or α/2 l+1 2 l Z/pZ We remember the number n α of added 2 l Similar for β: β Z/pZ or β 2 l Z/pZ n β := number of correction of 2 l for β S. Graillat (Univ. Paris 6) Dot products in finite fields 18 / 36
34 First method: final computation a b = = N a i b i i=1 N α i + i=1 N β i + i=1 N i=1 r i = (α i /2 l+1 2 l ) + α i /2 l+1 + (β i 2 l ) + β i + n α N n α n β N n β N + (n α + n β ) 2 l r i S. Graillat (Univ. Paris 6) Dot products in finite fields 19 / 36
35 First method: final computation a b = = N a i b i i=1 N α i + i=1 N β i + i=1 N i=1 r i = (α i /2 l+1 2 l ) + α i /2 l+1 + (β i 2 l ) + β i + n α N n α n β N n β N + (n α + n β ) 2 l r i λ(p 1) < 2 M 1 = summation by bundle of λ numbers and then reduction mod p S. Graillat (Univ. Paris 6) Dot products in finite fields 19 / 36
36 Performances On Itanium2 With FMA In double precision (p 1 < ) Comparison with GMP S. Graillat (Univ. Paris 6) Dot products in finite fields 20 / 36
37 First method: Performances on Itanium2 (1/4) Figure: Comparison with GMP: time=f ( p [2 23, 2 52 ] ), for N = 10 5 S. Graillat (Univ. Paris 6) Dot products in finite fields 21 / 36
38 First method: Performances on Itanium2 (2/4) Figure: Comparison with GMP: time=f (N, log 2 (p)) GMP on the top S. Graillat (Univ. Paris 6) Dot products in finite fields 22 / 36
39 First method: Performances on Itanium2 (3/4) Figure: Surface: ratio=time(gmp)/time(algo) = f (N, log 2 (p)) S. Graillat (Univ. Paris 6) Dot products in finite fields 23 / 36
40 First method: Performances on Itanium2 (4/4) Figure: ratio=time(gmp)/time(algo) = f (N, log 2 (p)) S. Graillat (Univ. Paris 6) Dot products in finite fields 24 / 36
41 Computation of dot products Second method S. Graillat (Univ. Paris 6) Dot products in finite fields 25 / 36
42 Computation of dot products: second method Assumption : p 1 < 2 M 1 and N < 2 M/2 S. Graillat (Univ. Paris 6) Dot products in finite fields 26 / 36
43 Computation of dot products: second method Assumption : p 1 < 2 M 1 and N < 2 M/2 Idea : Split the number with a representation with only half the mantissa Sum them without error Reduction modulo p only at the end S. Graillat (Univ. Paris 6) Dot products in finite fields 26 / 36
44 Computation of dot products: second method Assumption : p 1 < 2 M 1 and N < 2 M/2 Idea : Split the number with a representation with only half the mantissa Sum them without error Reduction modulo p only at the end Use ExtractScalar to get: s 1 = M 2 i [1, N], a i b i = α i + β i + γ i + δ i = A i 2 M+s 1 + B i 2 M + C i 2 s 1 + D i N a b = 2 M+s 1 A i + 2 M i=1 N B i + 2 s 1 i=1 i=1 i=1 N N C i + D i (mod p) S. Graillat (Univ. Paris 6) Dot products in finite fields 26 / 36
45 Second method: principle of the splitting of a i b i (1/2) 2M 3M/2 M M/2 0 S. Graillat (Univ. Paris 6) Dot products in finite fields 27 / 36
46 Second method: principle of the splitting of a i b i (1/2) a i b i 2M 3M/2 M M/2 0 S. Graillat (Univ. Paris 6) Dot products in finite fields 27 / 36
47 Second method: principle of the splitting of a i b i (1/2) x a i b i y 2M 3M/2 M M/2 0 S. Graillat (Univ. Paris 6) Dot products in finite fields 27 / 36
48 Second method: principle of the splitting of a i b i (1/2) α x a i b i β y 2M 3M/2 M M/2 0 S. Graillat (Univ. Paris 6) Dot products in finite fields 27 / 36
49 Second method: principle of the splitting of a i b i (1/2) a i b i α x β y β ɛ 2M 3M/2 M M/2 0 S. Graillat (Univ. Paris 6) Dot products in finite fields 27 / 36
50 Second method: principle of the splitting of a i b i (1/2) a i b i α x β y β ɛ γ δ 2M 3M/2 M M/2 0 S. Graillat (Univ. Paris 6) Dot products in finite fields 27 / 36
51 Second method: principle of the splitting of a i b i (1/2) a i b i α x β y β ɛ γ δ 2M α 3M/2 β M γ M/2 δ 0 S. Graillat (Univ. Paris 6) Dot products in finite fields 27 / 36
52 Second method: principle of the splitting of a i b i (1/2) a i b i α x β y β ɛ γ δ 2M α 3M/2 β M γ M/2 δ 0 a i b i = α + β + γ + δ S. Graillat (Univ. Paris 6) Dot products in finite fields 27 / 36
53 Second method: principle of the splitting of a i b i (2/2) Split 4 vectors of N < 2 M/2 elements with at most M/2 bits 2M 3M/2 M M/2 0 S. Graillat (Univ. Paris 6) Dot products in finite fields 28 / 36
54 Second method: principle of the splitting of a i b i (2/2) Split 4 vectors of N < 2 M/2 elements with at most M/2 bits α β γ δ 2M 3M/2 M M/2 0 S. Graillat (Univ. Paris 6) Dot products in finite fields 28 / 36
55 Second method: principle of the splitting of a i b i (2/2) Split 4 vectors of N < 2 M/2 elements with at most M/2 bits α β γ δ α β γ δ 2M 3M/2 M M/2 0 S. Graillat (Univ. Paris 6) Dot products in finite fields 28 / 36
56 Second method: Results Final results: a b = N N N α i + β i + γ i + i=1 i=1 i=1 i=1 N δ i (mod p) Total cost: 16N + O(1) flops S. Graillat (Univ. Paris 6) Dot products in finite fields 29 / 36
57 Second method: Performances on Itanium2 (1/3) Figure: Comparison with GMP: time=f (N, log 2 (p)) GMP on the top S. Graillat (Univ. Paris 6) Dot products in finite fields 30 / 36
58 Second method: Performances on Itanium2 (2/3) Figure: Surface: ratio=time(gmp)/time(algo) = f (N, log 2 (p)) S. Graillat (Univ. Paris 6) Dot products in finite fields 31 / 36
59 Second method: Performances on Itanium2 (3/3) Figure: ratio=time(gmp)/time(algo) = f (N, log 2 (p)) S. Graillat (Univ. Paris 6) Dot products in finite fields 32 / 36
60 Comparison of the two methods S. Graillat (Univ. Paris 6) Dot products in finite fields 33 / 36
61 Comparison of the two methods Figure: time(method 2 ) time(method 1 ) = f (N, log 2 (p)) S. Graillat (Univ. Paris 6) Dot products in finite fields 34 / 36
62 Conclusion and future work Conclusion: Two efficient algorithms for computing dot product Efficient algorithms compared to GMP Use of error-free transformations in rounding toward zero Future work: Second method with a splitting in 3 parts (with N < 2 M/3 ) Extension to Galois fields GF (2 n ) Use of longlong library Use of RNS techniques Parallelisation of the algorithms for GPU S. Graillat (Univ. Paris 6) Dot products in finite fields 35 / 36
63 The end Thank you for your attention S. Graillat (Univ. Paris 6) Dot products in finite fields 36 / 36
Fast dot product over finite field
Fast dot product over finite field Jérémy JEAN Jean.Jeremy.Jean@gmail.com February 2010 Master thesis report 1 LIP6 Paris, France Stef Graillat Kungliga Tekniska Högskolan (KTH) Stockholm, Sweden Johan
More informationFast Dot Product over Finite Field JÉRÉMY JEAN
Fast Dot Product over Finite Field JÉRÉMY JEAN Master of Science Thesis Stockholm, Sweden 2010 Fast Dot Product over Finite Field JÉRÉMY JEAN Master s Thesis in Computer Science (30 ECTS credits) at the
More informationAccurate polynomial evaluation in floating point arithmetic
in floating point arithmetic Université de Perpignan Via Domitia Laboratoire LP2A Équipe de recherche en Informatique DALI MIMS Seminar, February, 10 th 2006 General motivation Provide numerical algorithms
More informationFaithful Horner Algorithm
ICIAM 07, Zurich, Switzerland, 16 20 July 2007 Faithful Horner Algorithm Philippe Langlois, Nicolas Louvet Université de Perpignan, France http://webdali.univ-perp.fr Ph. Langlois (Université de Perpignan)
More informationCompensated Horner scheme in complex floating point arithmetic
Compensated Horner scheme in complex floating point arithmetic Stef Graillat, Valérie Ménissier-Morain UPMC Univ Paris 06, UMR 7606, LIP6 4 place Jussieu, F-75252, Paris cedex 05, France stef.graillat@lip6.fr,valerie.menissier-morain@lip6.fr
More information4ccurate 4lgorithms in Floating Point 4rithmetic
4ccurate 4lgorithms in Floating Point 4rithmetic Philippe LANGLOIS 1 1 DALI Research Team, University of Perpignan, France SCAN 2006 at Duisburg, Germany, 26-29 September 2006 Philippe LANGLOIS (UPVD)
More informationOn various ways to split a floating-point number
On various ways to split a floating-point number Claude-Pierre Jeannerod Jean-Michel Muller Paul Zimmermann Inria, CNRS, ENS Lyon, Université de Lyon, Université de Lorraine France ARITH-25 June 2018 -2-
More informationAutomatic Verified Numerical Computations for Linear Systems
Automatic Verified Numerical Computations for Linear Systems Katsuhisa Ozaki (Shibaura Institute of Technology) joint work with Takeshi Ogita (Tokyo Woman s Christian University) Shin ichi Oishi (Waseda
More informationThe Classical Relative Error Bounds for Computing a2 + b 2 and c/ a 2 + b 2 in Binary Floating-Point Arithmetic are Asymptotically Optimal
-1- The Classical Relative Error Bounds for Computing a2 + b 2 and c/ a 2 + b 2 in Binary Floating-Point Arithmetic are Asymptotically Optimal Claude-Pierre Jeannerod Jean-Michel Muller Antoine Plet Inria,
More informationAccurate Solution of Triangular Linear System
SCAN 2008 Sep. 29 - Oct. 3, 2008, at El Paso, TX, USA Accurate Solution of Triangular Linear System Philippe Langlois DALI at University of Perpignan France Nicolas Louvet INRIA and LIP at ENS Lyon France
More informationACCURATE SUM AND DOT PRODUCT
ACCURATE SUM AND DOT PRODUCT TAKESHI OGITA, SIEGFRIED M. RUMP, AND SHIN ICHI OISHI Abstract. Algorithms for summation and dot product of floating point numbers are presented which are fast in terms of
More informationCME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 5. Ax = b.
CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 5 GENE H GOLUB Suppose we want to solve We actually have an approximation ξ such that 1 Perturbation Theory Ax = b x = ξ + e The question is, how
More informationHow do computers represent numbers?
How do computers represent numbers? Tips & Tricks Week 1 Topics in Scientific Computing QMUL Semester A 2017/18 1/10 What does digital mean? The term DIGITAL refers to any device that operates on discrete
More informationSolving Triangular Systems More Accurately and Efficiently
17th IMACS World Congress, July 11-15, 2005, Paris, France Scientific Computation, Applied Mathematics and Simulation Solving Triangular Systems More Accurately and Efficiently Philippe LANGLOIS and Nicolas
More informationHow to Ensure a Faithful Polynomial Evaluation with the Compensated Horner Algorithm
How to Ensure a Faithful Polynomial Evaluation with the Compensated Horner Algorithm Philippe Langlois, Nicolas Louvet Université de Perpignan, DALI Research Team {langlois, nicolas.louvet}@univ-perp.fr
More informationCompensated Horner Scheme
Compensated Horner Scheme S. Graillat 1, Philippe Langlois 1, Nicolas Louvet 1 DALI-LP2A Laboratory. Université de Perpignan Via Domitia. firstname.lastname@univ-perp.fr, http://webdali.univ-perp.fr Abstract.
More informationContinued fractions and number systems: applications to correctly-rounded implementations of elementary functions and modular arithmetic.
Continued fractions and number systems: applications to correctly-rounded implementations of elementary functions and modular arithmetic. Mourad Gouicem PEQUAN Team, LIP6/UPMC Nancy, France May 28 th 2013
More informationThe Euclidean Division Implemented with a Floating-Point Multiplication and a Floor
The Euclidean Division Implemented with a Floating-Point Multiplication and a Floor Vincent Lefèvre 11th July 2005 Abstract This paper is a complement of the research report The Euclidean division implemented
More informationhal , version 1-29 Feb 2008
Compressed Modular Matrix Multiplication Jean-Guillaume Dumas Laurent Fousse Bruno Salvy February 29, 2008 Abstract We propose to store several integers modulo a small prime into a single machine word.
More informationRound-off Errors and Computer Arithmetic - (1.2)
Round-off Errors and Comuter Arithmetic - (.). Round-off Errors: Round-off errors is roduced when a calculator or comuter is used to erform real number calculations. That is because the arithmetic erformed
More informationAn accurate algorithm for evaluating rational functions
An accurate algorithm for evaluating rational functions Stef Graillat To cite this version: Stef Graillat. An accurate algorithm for evaluating rational functions. 2017. HAL Id: hal-01578486
More informationFLOATING POINT ARITHMETHIC - ERROR ANALYSIS
FLOATING POINT ARITHMETHIC - ERROR ANALYSIS Brief review of floating point arithmetic Model of floating point arithmetic Notation, backward and forward errors Roundoff errors and floating-point arithmetic
More informationACM 106a: Lecture 1 Agenda
1 ACM 106a: Lecture 1 Agenda Introduction to numerical linear algebra Common problems First examples Inexact computation What is this course about? 2 Typical numerical linear algebra problems Systems of
More informationA field F is a set of numbers that includes the two numbers 0 and 1 and satisfies the properties:
Byte multiplication 1 Field arithmetic A field F is a set of numbers that includes the two numbers 0 and 1 and satisfies the properties: F is an abelian group under addition, meaning - F is closed under
More informationLecture Notes 7, Math/Comp 128, Math 250
Lecture Notes 7, Math/Comp 128, Math 250 Misha Kilmer Tufts University October 23, 2005 Floating Point Arithmetic We talked last time about how the computer represents floating point numbers. In a floating
More informationComputer Arithmetic. MATH 375 Numerical Analysis. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Computer Arithmetic
Computer Arithmetic MATH 375 Numerical Analysis J. Robert Buchanan Department of Mathematics Fall 2013 Machine Numbers When performing arithmetic on a computer (laptop, desktop, mainframe, cell phone,
More informationTight and rigourous error bounds for basic building blocks of double-word arithmetic. Mioara Joldes, Jean-Michel Muller, Valentina Popescu
Tight and rigourous error bounds for basic building blocks of double-word arithmetic Mioara Joldes, Jean-Michel Muller, Valentina Popescu SCAN - September 2016 AMPAR CudA Multiple Precision ARithmetic
More informationMathematical preliminaries and error analysis
Mathematical preliminaries and error analysis Tsung-Ming Huang Department of Mathematics National Taiwan Normal University, Taiwan September 12, 2015 Outline 1 Round-off errors and computer arithmetic
More informationERROR ESTIMATION OF FLOATING-POINT SUMMATION AND DOT PRODUCT
accepted for publication in BIT, May 18, 2011. ERROR ESTIMATION OF FLOATING-POINT SUMMATION AND DOT PRODUCT SIEGFRIED M. RUMP Abstract. We improve the well-known Wilkinson-type estimates for the error
More informationAdaptive and Efficient Algorithm for 2D Orientation Problem
Japan J. Indust. Appl. Math., 26 (2009), 215 231 Area 2 Adaptive and Efficient Algorithm for 2D Orientation Problem Katsuhisa Ozaki, Takeshi Ogita, Siegfried M. Rump and Shin ichi Oishi Research Institute
More informationQ-adic Transform revisited
Q-adic Transform revisited Jean-Guillaume Dumas To cite this version: Jean-Guillaume Dumas. Q-adic Transform revisited. 2007. HAL Id: hal-00173894 https://hal.archives-ouvertes.fr/hal-00173894v3
More informationTight Enclosure of Matrix Multiplication with Level 3 BLAS
Tight Enclosure of Matrix Multiplication with Level 3 BLAS K. Ozaki (Shibaura Institute of Technology) joint work with T. Ogita (Tokyo Woman s Christian University) 8th Small Workshop on Interval Methods
More informationFLOATING POINT ARITHMETHIC - ERROR ANALYSIS
FLOATING POINT ARITHMETHIC - ERROR ANALYSIS Brief review of floating point arithmetic Model of floating point arithmetic Notation, backward and forward errors 3-1 Roundoff errors and floating-point arithmetic
More informationECS 231 Computer Arithmetic 1 / 27
ECS 231 Computer Arithmetic 1 / 27 Outline 1 Floating-point numbers and representations 2 Floating-point arithmetic 3 Floating-point error analysis 4 Further reading 2 / 27 Outline 1 Floating-point numbers
More informationExtended precision with a rounding mode toward zero environment. Application on the CELL processor
Extended precision with a rounding mode toward zero environment. Application on the CELL processor Hong Diep Nguyen (hong.diep.nguyen@ens-lyon.fr), Stef Graillat (stef.graillat@lip6.fr), Jean-Luc Lamotte
More information1.1 COMPUTER REPRESENTATION OF NUM- BERS, REPRESENTATION ERRORS
Chapter 1 NUMBER REPRESENTATION, ERROR ANALYSIS 1.1 COMPUTER REPRESENTATION OF NUM- BERS, REPRESENTATION ERRORS Floating-point representation x t,r of a number x: x t,r = m t P cr, where: P - base (the
More informationNumber Representation and Waveform Quantization
1 Number Representation and Waveform Quantization 1 Introduction This lab presents two important concepts for working with digital signals. The first section discusses how numbers are stored in memory.
More informationTowards Fast, Accurate and Reproducible LU Factorization
Towards Fast, Accurate and Reproducible LU Factorization Roman Iakymchuk 1, David Defour 2, and Stef Graillat 3 1 KTH Royal Institute of Technology, CSC, CST/PDC 2 Université de Perpignan, DALI LIRMM 3
More informationImplementation of float float operators on graphic hardware
Implementation of float float operators on graphic hardware Guillaume Da Graça David Defour DALI, Université de Perpignan Outline Why GPU? Floating point arithmetic on GPU Float float format Problem &
More informationChapter 1: Introduction and mathematical preliminaries
Chapter 1: Introduction and mathematical preliminaries Evy Kersalé September 26, 2011 Motivation Most of the mathematical problems you have encountered so far can be solved analytically. However, in real-life,
More informationAccurate Floating Point Product and Exponentiation
Accurate Floating Point Product and Exponentiation Stef Graillat To cite this version: Stef Graillat. Accurate Floating Point Product and Exponentiation. IEEE Transactions on Computers, Institute of Electrical
More informationLecture 7. Floating point arithmetic and stability
Lecture 7 Floating point arithmetic and stability 2.5 Machine representation of numbers Scientific notation: 23 }{{} }{{} } 3.14159265 {{} }{{} 10 sign mantissa base exponent (significand) s m β e A floating
More informationJim Lambers MAT 610 Summer Session Lecture 2 Notes
Jim Lambers MAT 610 Summer Session 2009-10 Lecture 2 Notes These notes correspond to Sections 2.2-2.4 in the text. Vector Norms Given vectors x and y of length one, which are simply scalars x and y, the
More informationAlgorithms for Accurate, Validated and Fast Polynomial Evaluation
Algorithms for Accurate, Validated and Fast Polynomial Evaluation Stef Graillat, Philippe Langlois, Nicolas Louvet Abstract: We survey a class of algorithms to evaluate polynomials with oating point coecients
More informationMANY numerical problems in dynamical systems
IEEE TRANSACTIONS ON COMPUTERS, VOL., 201X 1 Arithmetic algorithms for extended precision using floating-point expansions Mioara Joldeş, Olivier Marty, Jean-Michel Muller and Valentina Popescu Abstract
More informationOn Newton-Raphson iteration for multiplicative inverses modulo prime powers
On Newton-Raphson iteration for multiplicative inverses modulo prime powers Jean-Guillaume Dumas To cite this version: Jean-Guillaume Dumas. On Newton-Raphson iteration for multiplicative inverses modulo
More informationFloating Point Arithmetic and Rounding Error Analysis
Floating Point Arithmetic and Rounding Error Analysis Claude-Pierre Jeannerod Nathalie Revol Inria LIP, ENS de Lyon 2 Context Starting point: How do numerical algorithms behave in nite precision arithmetic?
More informationAbstract Algebra Part I: Group Theory
Abstract Algebra Part I: Group Theory From last time: Let G be a set. A binary operation on G is a function m : G G G Some examples: Some non-examples Addition and multiplication Dot and scalar products
More informationarxiv:cs/ v2 [cs.sc] 19 Apr 2004
Efficient dot product over word-size finite fields Jean-Guillaume Dumas Laboratoire de Modélisation et Calcul. 50 av. des Mathématiques, B.P. 53, 38041 Grenoble, France. Jean-Guillaume.Dumas@imag.fr, www-lmc.imag.fr/lmc-mosaic/jean-guillaume.dumas
More informationA new multiplication algorithm for extended precision using floating-point expansions. Valentina Popescu, Jean-Michel Muller,Ping Tak Peter Tang
A new multiplication algorithm for extended precision using floating-point expansions Valentina Popescu, Jean-Michel Muller,Ping Tak Peter Tang ARITH 23 July 2016 AMPAR CudA Multiple Precision ARithmetic
More informationChapter 4 Mathematics of Cryptography
Chapter 4 Mathematics of Cryptography Part II: Algebraic Structures Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4.1 Chapter 4 Objectives To review the concept
More informationIntroduction to Cryptology. Lecture 19
Introduction to Cryptology Lecture 19 Announcements HW6 due today HW7 due Thursday 4/20 Remember to sign up for Extra Credit Agenda Last time More details on AES/DES (K/L 6.2) Practical Constructions of
More informationChapter 1 Error Analysis
Chapter 1 Error Analysis Several sources of errors are important for numerical data processing: Experimental uncertainty: Input data from an experiment have a limited precision. Instead of the vector of
More informationResidue Number Systems. Alternative number representations. TSTE 8 Digital Arithmetic Seminar 2. Residue Number Systems.
TSTE8 Digital Arithmetic Seminar Oscar Gustafsson The idea is to use the residues of the numbers and perform operations on the residues Also called modular arithmetic since the residues are computed using
More informationNewton-Raphson Algorithms for Floating-Point Division Using an FMA
Newton-Raphson Algorithms for Floating-Point Division Using an FMA Nicolas Louvet, Jean-Michel Muller, Adrien Panhaleux Abstract Since the introduction of the Fused Multiply and Add (FMA) in the IEEE-754-2008
More informationError Correction Review
Error Correction Review A single overall parity-check equation detects single errors. Hamming codes used m equations to correct one error in 2 m 1 bits. We can use nonbinary equations if we create symbols
More informationAlgebra for error control codes
Algebra for error control codes EE 387, Notes 5, Handout #7 EE 387 concentrates on block codes that are linear: Codewords components are linear combinations of message symbols. g 11 g 12 g 1n g 21 g 22
More informationDense Linear Algebra over Finite Fields: the FFLAS and FFPACK packages
Dense Linear Algebra over Finite Fields: the FFLAS and FFPACK packages Jean-Guillaume Dumas, Thierry Gautier, Pascal Giorgi, Clément Pernet To cite this version: Jean-Guillaume Dumas, Thierry Gautier,
More informationFloating-point Computation
Chapter 2 Floating-point Computation 21 Positional Number System An integer N in a number system of base (or radix) β may be written as N = a n β n + a n 1 β n 1 + + a 1 β + a 0 = P n (β) where a i are
More informationChapter 4 Number Representations
Chapter 4 Number Representations SKEE2263 Digital Systems Mun im/ismahani/izam {munim@utm.my,e-izam@utm.my,ismahani@fke.utm.my} February 9, 2016 Table of Contents 1 Fundamentals 2 Signed Numbers 3 Fixed-Point
More informationACCURATE FLOATING-POINT SUMMATION PART II: SIGN, K-FOLD FAITHFUL AND ROUNDING TO NEAREST
submitted for publication in SISC, November 13, 2005, revised April 13, 2007 and April 15, 2008, accepted August 21, 2008; appeared SIAM J. Sci. Comput. Vol. 31, Issue 2, pp. 1269-1302 (2008) ACCURATE
More informationFields in Cryptography. Çetin Kaya Koç Winter / 30
Fields in Cryptography http://koclab.org Çetin Kaya Koç Winter 2017 1 / 30 Field Axioms Fields in Cryptography A field F consists of a set S and two operations which we will call addition and multiplication,
More informationarxiv: v5 [cs.sc] 15 May 2018
On Newton-Raphson iteration for multiplicative inverses modulo prime powers arxiv:109.666v5 [cs.sc] 15 May 018 Jean-Guillaume Dumas May 16, 018 Abstract We study algorithms for the fast computation of
More informationFinite Fields. SOLUTIONS Network Coding - Prof. Frank H.P. Fitzek
Finite Fields In practice most finite field applications e.g. cryptography and error correcting codes utilizes a specific type of finite fields, namely the binary extension fields. The following exercises
More informationOptimizing Scientific Libraries for the Itanium
0 Optimizing Scientific Libraries for the Itanium John Harrison Intel Corporation Gelato Federation Meeting, HP Cupertino May 25, 2005 1 Quick summary Intel supplies drop-in replacement versions of common
More informationNotes on floating point number, numerical computations and pitfalls
Notes on floating point number, numerical computations and pitfalls November 6, 212 1 Floating point numbers An n-digit floating point number in base β has the form x = ±(.d 1 d 2 d n ) β β e where.d 1
More information1 Floating point arithmetic
Introduction to Floating Point Arithmetic Floating point arithmetic Floating point representation (scientific notation) of numbers, for example, takes the following form.346 0 sign fraction base exponent
More informationImproving the Compensated Horner Scheme with a Fused Multiply and Add
Équipe de Recherche DALI Laboratoire LP2A, EA 3679 Université de Perpignan Via Domitia Improving the Compensated Horner Scheme with a Fused Multiply and Add S. Graillat, Ph. Langlois, N. Louvet DALI-LP2A
More informationVerification methods for linear systems using ufp estimation with rounding-to-nearest
NOLTA, IEICE Paper Verification methods for linear systems using ufp estimation with rounding-to-nearest Yusuke Morikura 1a), Katsuhisa Ozaki 2,4, and Shin ichi Oishi 3,4 1 Graduate School of Fundamental
More informationWednesday, February 21. Today we will begin Course Notes Chapter 5 (Number Theory).
Wednesday, February 21 Today we will begin Course Notes Chapter 5 (Number Theory). 1 Return to Chapter 5 In discussing Methods of Proof (Chapter 3, Section 2) we introduced the divisibility relation from
More informationGAPS IN BINARY EXPANSIONS OF SOME ARITHMETIC FUNCTIONS, AND THE IRRATIONALITY OF THE EULER CONSTANT
Journal of Prime Research in Mathematics Vol. 8 202, 28-35 GAPS IN BINARY EXPANSIONS OF SOME ARITHMETIC FUNCTIONS, AND THE IRRATIONALITY OF THE EULER CONSTANT JORGE JIMÉNEZ URROZ, FLORIAN LUCA 2, MICHEL
More informationGalois fields/1. (M3) There is an element 1 (not equal to 0) such that a 1 = a for all a.
Galois fields 1 Fields A field is an algebraic structure in which the operations of addition, subtraction, multiplication, and division (except by zero) can be performed, and satisfy the usual rules. More
More informationEffect of round-off errors on the. Accuracy of randomized algorithms
Effect of round-off errors on the accuracy of randomized algorithms ÉLIAUS-PROMES (UPR 8521 CNRS) Perpignan France marc.daumas@univ-perp.fr Outline 1 2 3 4 5 Characterize the accuracy of the result of
More informationFloating Point Number Systems. Simon Fraser University Surrey Campus MACM 316 Spring 2005 Instructor: Ha Le
Floating Point Number Systems Simon Fraser University Surrey Campus MACM 316 Spring 2005 Instructor: Ha Le 1 Overview Real number system Examples Absolute and relative errors Floating point numbers Roundoff
More informationTu: 9/3/13 Math 471, Fall 2013, Section 001 Lecture 1
Tu: 9/3/13 Math 71, Fall 2013, Section 001 Lecture 1 1 Course intro Notes : Take attendance. Instructor introduction. Handout : Course description. Note the exam days (and don t be absent). Bookmark the
More informationSTEP Support Programme. Hints and Partial Solutions for Assignment 17
STEP Support Programme Hints and Partial Solutions for Assignment 7 Warm-up You need to be quite careful with these proofs to ensure that you are not assuming something that should not be assumed. For
More informationComputing the Monodromy Group of a Plane Algebraic Curve Using a New Numerical-modular Newton-Puiseux Algorithm
Computing the Monodromy Group of a Plane Algebraic Curve Using a New Numerical-modular Newton-Puiseux Algorithm Poteaux Adrien XLIM-DMI UMR CNRS 6172 Université de Limoges, France SNC'07 University of
More informationAutomated design of floating-point logarithm functions on integer processors
23rd IEEE Symposium on Computer Arithmetic Santa Clara, CA, USA, 10-13 July 2016 Automated design of floating-point logarithm functions on integer processors Guillaume Revy (presented by Florent de Dinechin)
More informationDefinition For a set F, a polynomial over F with variable x is of the form
*6. Polynomials Definition For a set F, a polynomial over F with variable x is of the form a n x n + a n 1 x n 1 + a n 2 x n 2 +... + a 1 x + a 0, where a n, a n 1,..., a 1, a 0 F. The a i, 0 i n are the
More informationElliptic Curves I. The first three sections introduce and explain the properties of elliptic curves.
Elliptic Curves I 1.0 Introduction The first three sections introduce and explain the properties of elliptic curves. A background understanding of abstract algebra is required, much of which can be found
More informationAn Introduction to Differential Algebra
An Introduction to Differential Algebra Alexander Wittig1, P. Di Lizia, R. Armellin, et al. 1 ESA Advanced Concepts Team (TEC-SF) SRL, Milan Dinamica Outline 1 Overview Five Views of Differential Algebra
More informationCommutative Rings and Fields
Commutative Rings and Fields 1-22-2017 Different algebraic systems are used in linear algebra. The most important are commutative rings with identity and fields. Definition. A ring is a set R with two
More informationGetting tight error bounds in floating-point arithmetic: illustration with complex functions, and the real x n function
Getting tight error bounds in floating-point arithmetic: illustration with complex functions, and the real x n function Jean-Michel Muller collaborators: S. Graillat, C.-P. Jeannerod, N. Louvet V. Lefèvre
More informationFinding Divisors, Number of Divisors and Summation of Divisors. Jane Alam Jan
Finding Divisors, Number of Divisors and Summation of Divisors by Jane Alam Jan Finding Divisors If we observe the property of the numbers, we will find some interesting facts. Suppose we have a number
More informationOn the computation of the reciprocal of floating point expansions using an adapted Newton-Raphson iteration
On the computation of the reciprocal of floating point expansions using an adapted Newton-Raphson iteration Mioara Joldes, Valentina Popescu, Jean-Michel Muller ASAP 2014 1 / 10 Motivation Numerical problems
More information44.(ii) In this case we have that (12, 38) = 2 which does not divide 5 and so there are no solutions.
Solutions to Assignment 3 5E More Properties of Congruence 40. We can factor 729 = 7 3 9 so it is enough to show that 3 728 (mod 7), 3 728 (mod 3) and 3 728 (mod 9). 3 728 =(3 3 ) 576 = (27) 576 ( ) 576
More informationYou separate binary numbers into columns in a similar fashion. 2 5 = 32
RSA Encryption 2 At the end of Part I of this article, we stated that RSA encryption works because it s impractical to factor n, which determines P 1 and P 2, which determines our private key, d, which
More informationSPECTRA - a Maple library for solving linear matrix inequalities in exact arithmetic
SPECTRA - a Maple library for solving linear matrix inequalities in exact arithmetic Didier Henrion Simone Naldi Mohab Safey El Din Version 1.0 of November 5, 2016 Abstract This document briefly describes
More informationMAT 243 Test 2 SOLUTIONS, FORM A
MAT Test SOLUTIONS, FORM A 1. [10 points] Give a recursive definition for the set of all ordered pairs of integers (x, y) such that x < y. Solution: Let S be the set described above. Note that if (x, y)
More informationUNIT V FINITE WORD LENGTH EFFECTS IN DIGITAL FILTERS PART A 1. Define 1 s complement form? In 1,s complement form the positive number is represented as in the sign magnitude form. To obtain the negative
More informationThe set of integers will be denoted by Z = {, -3, -2, -1, 0, 1, 2, 3, 4, }
Integers and Division 1 The Integers and Division This area of discrete mathematics belongs to the area of Number Theory. Some applications of the concepts in this section include generating pseudorandom
More informationTomáš Madaras Congruence classes
Congruence classes For given integer m 2, the congruence relation modulo m at the set Z is the equivalence relation, thus, it provides a corresponding partition of Z into mutually disjoint sets. Definition
More informationLecture Notes. Advanced Discrete Structures COT S
Lecture Notes Advanced Discrete Structures COT 4115.001 S15 2015-01-13 Recap Divisibility Prime Number Theorem Euclid s Lemma Fundamental Theorem of Arithmetic Euclidean Algorithm Basic Notions - Section
More informationChapter 1 Mathematical Preliminaries and Error Analysis
Chapter 1 Mathematical Preliminaries and Error Analysis Per-Olof Persson persson@berkeley.edu Department of Mathematics University of California, Berkeley Math 128A Numerical Analysis Limits and Continuity
More informationPrimes of the Form x 2 + ny 2
Primes of the Form x 2 + ny 2 Steven Charlton 28 November 2012 Outline 1 Motivating Examples 2 Quadratic Forms 3 Class Field Theory 4 Hilbert Class Field 5 Narrow Class Field 6 Cubic Forms 7 Modular Forms
More informationParallel Reproducible Summation
Parallel Reproducible Summation James Demmel Mathematics Department and CS Division University of California at Berkeley Berkeley, CA 94720 demmel@eecs.berkeley.edu Hong Diep Nguyen EECS Department University
More information17 Galois Fields Introduction Primitive Elements Roots of Polynomials... 8
Contents 17 Galois Fields 2 17.1 Introduction............................... 2 17.2 Irreducible Polynomials, Construction of GF(q m )... 3 17.3 Primitive Elements... 6 17.4 Roots of Polynomials..........................
More informationWhat is it we are looking for in these algorithms? We want algorithms that are
Fundamentals. Preliminaries The first question we want to answer is: What is computational mathematics? One possible definition is: The study of algorithms for the solution of computational problems in
More informationNumber Theory. CSS322: Security and Cryptography. Sirindhorn International Institute of Technology Thammasat University CSS322. Number Theory.
CSS322: Security and Cryptography Sirindhorn International Institute of Technology Thammasat University Prepared by Steven Gordon on 29 December 2011 CSS322Y11S2L06, Steve/Courses/2011/S2/CSS322/Lectures/number.tex,
More information