Table Of ContentAccuracy and Stability
of Numerical Algorithms
Nicholas J. Higham
University of Manchester
Manchester, England
Accuracy and Stability
of Numerical Algorithms
Society for Industrial and Applied Mathematics
Philadelphia
thgirypoC © 6991 yb eht yteicoS rof lairtsudnI dna deilppA.scitamehtaM
1098765432
llA sth g.idrevr edseetrnirP ni eht detinU setatS fo .aciremA oN trap fo siht koob yameb
,decudor p,edrerots ro dettimsnart ni yna rennam tuohtiw eht netti rnwoissimrep foeht
.rehsilbup roF .noitamrofni etirw ot eht yteicoS rof lairtsudnI dna deilppA,scitamehtaM
0063 ytisrevinU ytiC ecneicS ,retneC ,aihpledalihP AP.8862-40191
Library of Congress Cataloging-in-Publication Data
,mahgiH salohciN ,.J -1691
ycaruccA dna ytilibats fo lacirem usnmhtirogla / salohciN.J
.mahgiH
.p .mc
sedulcnI lacihpargoilbib secnerefer .p( - ) dna .xedni
NBSI 7898-O 2-553-l).kbp(
.1 laciremuN ataD--sisylana .gnissecorp .2 retupmoC.smhtirogla
.I.eltiT
QA297.H53 1996
5 5’5820’4.91 102cd-- 95-39903
o si a der.ektrsaimgeedrart
Dedicated to
Alan M. Turing
and
James H. Wilkinson
Contents
List of Figures xvii
List of Tables xix
Preface xxi
About the Dedication xxvii
1 Principles of Finite Precision Computation 1
1.1 Notation and Background . . . . . . . . . . . . . . . . . . . . 2
1.2 evitaleR rorrE dna tnacifingiSstigiD . . . . . . . . . . . . . . 4
1.3 secruoS fo srorrE . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4 noisi cseursPryecVaruccA . . . . . . . . . . . . . . . . . . . . 7
1.5 drawkcaB dna drawroF srorrE . . . . . . . . . . . . . . . . . . 7
1.6 Conditioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.7 Cancellation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.8 Solving a Quadratic Equation . . . . . . . . . . . . . . . . . . 11
1.9 Computing the Sample Variance . . . . . . . . . . . . . . . . . 12
1.10 Solving Linear Equations . . . . . . . . . . . . . . . . . . . . . 13
1.01.1 PPEG susreV s’remarC eluR . . . . . . . . . . . . . . . 14
1.11 Accumulation of Rounding Errors . . . . . . . . . . . . . . . . 16
1.12 Instability Without Cancellation . . . . . . . . . . . . . . . . . 17
1.21.1 ehT deeN rofgnitoviP . . . . . . . . . . . . . . . . . . 17
1.12.2 An Innocuous Calculation? . . . . . . . . . . . . . . . . 17
3.21.1 nA etinifnImuS . . . . . . . . . . . . . . . . . . . . . . 18
1.13 gnisaercnI eht noisicerP . . . . . . . . . . . . . . . . . . . . . . 19
1.14 Cancellation of Rounding Errors . . . . . . . . . . . . . . . . . 21
1.41.1 gnitupmoC . . . . . . . . . . . . . . . . . . 22
1.14.2 QR Factorization . . . . . . . . . . . . . . . . . . . . . 24
1.15 gnidnuoR srorrE naC eBlaicifeneB . . . . . . . . . . . . . . . 26
1.16 ytilibatS fo na mhtiroglA sdnepeD no ehtmelborP . . . . . . 27
71.1 gnidnuoR srorrE erA toN modnaR . . . . . . . . . . . . . . . 29
1.18 gningiseD tS elbasmhtiroglA . . . . . . . . . . . . . . . . . . . 30
1.19 Misconceptions . . . . . . . . . . . . . . . . . . . . . . . . . . 31
iiv
V111
1.20 Rounding Errors in Numerical Analysis . . . . . . . . . . . . . 32
1.21 Notes and References . . . . . . . . . . . . . . . . . . . . . . . 32
Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
2 Floating Point Arithmetic 39
2.1 Floating Point Number System . . . . . . . . . . . . . . . . . 40
2.2 Model of Arithmetic . . . . . . . . . . . . . . . . . . . . . . . . 44
3.2 IEEE Arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.2 Aberrant Arithmetics . . . . . . . . . . . . . . . . . . . . . . . 48
2.5 eciohC fo esaB dna noitubirtsiD fosrebmuN . . . . . . . . . . 51
2.6 Statistical Distribution of Rounding Errors . . . . . . . . . . . 52
2.7 Alternative Number Systems . . . . . . . . . . . . . . . . . . . 53
8.2 Accuracy Tests . . . . . . . . . . . . . . . . . . . . . . . . . . 54
9.2 setoN dna secnerefeR . . . . . . . . . . . . . . . . . . . . . . . 56
Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
3 Basics 67
3.1 Inner and Outer Products . . . . . . . . . . . . . . . . . . . . 68
2.3 ehT esopruP fo gnidnuoR rorrE sisylanA . . . . . . . . . . . . 71
3.3 Running Error Analysis . . . . . . . . . . . . . . . . . . . . . . 72
4.3 Notation for Error Analysis . . . . . . . . . . . . . . . . . . . 73
5.3 Matrix Multiplication . . . . . . . . . . . . . . . . . . . . . . . 76
6.3 Complex Arithmetic . . . . . . . . . . . . . . . . . . . . . . . . 78
3.7 Miscellany . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
8.3 Error Analysis Demystified . . . . . . . . . . . . . . . . . . . . 82
9.3 Other Approaches . . . . . . . . . . . . . . . . . . . . . . . . . 83
3.10 Notes and References . . . . . . . . . . . . . . . . . . . . . . . 84
Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
4 Summation 87
4.1 Summation Methods . . . . . . . . . . . . . . . . . . . . . . . 88
2.4 Error Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
4.3 Compensated Summation . . . . . . . . . . . . . . . . . . . . . 92
4.4 Other Summation Methods . . . . . . . . . . . . . . . . . . . . 97
5.4 Statistical Estimates of Accuracy . . . . . . . . . . . . . . . . 98
6.4 eciohC fodohteM . . . . . . . . . . . . . . . . . . . . . . . . . 98
4.7 setoN dna secnerefeR . . . . . . . . . . . . . . . . . . . . . . . 100
Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
5 Polynomials 103
5.1 s‘renroH dohteM . . . . . . . . . . . . . . . . . . . . . . . . .401
2.5 gnitaulavE sevitavireD . . . . . . . . . . . . . . . . . . . . . .601
3.5 The Newton Form and Polynomial Interpolation . . . , . . . . 109
xi
4.5 setoN dnasecnerefeR . . . . . . . . . . . . . . . . . . . . . . . 113
Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
6 Norms 117
6.1 rotceV smroN . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
6.2 Matrix Norms . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
6.3 The Matrix p -Norm . . . . . . . . . . . . . . . . . . . . . . . . 124
6.4 setoN dnasecnerefeR . . . . . . . . . . . . . . . . . . . . . . . 126
Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
7 Perturbation Theory for Linear Systems 131
7.1 esiwmroN sisylanA . . . . . . . . . . . . . . . . . . . . . . . . 132
7.2 Componentwise Analysis . . . . . . . . . . . . . . . . . . . . . 134
7.3 gnilacS ot eziminiM eht noitidnoCrebmuN . . . . . . . . . . . 137
7.4 ehT xirtaM esrevnI . . . . . . . . . . . . . . . . . . . . . . . . 140
7.5 Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
7.6 Numerical Stability . . . . . . . . . . . . . . . . . . . . . . . . 141
7.7 Practical Error Bounds . . . . . . . . . . . . . . . . . . . . . . 142
8.7 Perturbation Theory by Calculus . . . . . . . . . . . . . . . . 144
9.7 setoN dnasecnerefeR . . . . . . . . . . . . . . . . . . . . . . . 145
Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
8 Triangular Systems 151
8.1 Backward Error Analysis . . . . . . . . . . . . . . . . . . . . . 152
2.8 drawroF rorrE sisylanA . . . . . . . . . . . . . . . . . . . . . . 155
8.3 sdnuoB rof ehtesrevnI . . . . . . . . . . . . . . . . . . . . . . 159
8.4 A lellaraP nI-naF mhtiroglA . . . . . . . . . . . . . . . . . . . 162
8.5 setoN dnasecnerefeR . . . . . . . . . . . . . . . . . . . . . . . 164
8.5.1 LAPACK . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
9 LU Factorization and Linear Equations 169
9.1 Gaussian Elimination . . . . . . . . . . . . . . . . . . . . . . . 170
2.9 Error Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
9.3 The Growth Factor . . . . . . . . . . . . . . . . . . . . . . . . 177
9.4 laicepS secirtaM . . . . . . . . . . . . . . . . . . . . . . . . . . 181
5.9 Tridiagonal Matrices . . . . . . . . . . . . . . . . . . . . . . . 183
6.9 Historical Perspective . . . . . . . . . . . . . . . . . . . . . . . 186
9.7 gnilacS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
9.8 A iroiretsoP ytilibatS stseT . . . . . . . . . . . . . . . . . . . . 192
9.9 ytivitisneS fo eht ULnoitazirotcaF . . . . . . . . . . . . . . . 194
9.10 Notes and References . . . . . . . . . . . . . . . . . . . . . . . 195
9.10.1 LAPACK . . . . . . . . . . . . . . . . . . . . . . . . . . 198