Table Of ContentCopyright © 2010. Cambridge University Press. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permittedunder U.S. or applicable copyright law.
EBSCO Publishing : eBook Academic Collection Trial - printed on 5/26/2020 3:28 AM via
INCHEON NATIONAL UNIVERSITY
AN: 511701 ; Kornerup, Pemteor,r eMa tinulfao, rDmavaidt iWo..n; –Fi nwitwe wPre.cciasmionb Nruimdbgere .Soysrtgem/s9 7an8d0521761352
Arithmetic
Account: inchonun
Copyright © 2010. Cambridge University Press. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permittedunder U.S. or applicable copyright law.
EBSCO Publishing : eBook Academic Collection Trial - printed on 5/26/2020 3:28 AM via
INCHEON NATIONAL UNIVERSITY
AN: 511701 ; Kornerup, Peter, Matula, David W..; Finite Precision Number Systems and
Arithmetic
Account: inchonun
r
e
d
n
u
d FINITE PRECISION NUMBER SYSTEMS
e
t
it AND ARITHMETIC
m
r
e
p
s
e
s
u Fundamentalarithmeticoperationssupportvirtuallyalloftheengineering,
r
i
fa scientific,andfinancialcomputationsrequiredforpracticalapplicationsfrom
t
ep cryptography,tofinancialplanning,torocketscience.Thiscomprehensive
c
x
e referenceprovidesresearcherswiththethoroughunderstandingofnumber
,
r
he representationsthatisanecessaryfoundationfordesigningefficientarithmetic
s
i
bl algorithms.
u
p
e Usingtheelementaryfoundationsofradixnumbersystemsasabasisfor
h
t
m arithmetic,theauthorsdevelopandcomparealternativealgorithmsforthe
o
r
f fundamentaloperationsofaddition,multiplication,division,andsquarerootwith
n
o
si preciselydefinedroundings.Variousfiniteprecisionnumbersystemsare
s
i
rm investigated,withthefocusoncomparativeanalysisofpracticallyefficient
e
p
t algorithmsforclosedarithmeticoperationsoverthesesystems.
u
o
th Eachchapterbeginswithanintroductiontoitscontentsandendswith
i
w
m bibliographicnotesandanextensivebibliography.Thebookmayalsobeused
r
o
f forgraduateteaching:problemsandexercisesarescatteredthroughoutthetext
y
n
a andasolutionsmanualisavailableforinstructors.
n
i
d
e
c
u
d
o
r
p
e
r
e
b
t
o
n
y
a
M
.
d
e
v
r
e
s
e
r
s
t
h
g
i
r
l
l
A
.
s
s
e
r
P
y
t
i
s
r
© 2010. Cambridge Univeplicable copyright law.
p
ta
h
gr
io
r
y.
pS
o.
CU
EBSCO Publishing : eBook Academic Collection Trial - printed on 5/26/2020 3:28 AM via INCHEON NATIONAL
UNIVERSITY
AN: 511701 ; Kornerup, Peter, Matula, David W..; Finite Precision Number Systems and Arithmetic
Account: inchonun
EncyclopediaofMathematicsanditsApplications
r
e
d
n
u AllthetitleslistedbelowcanbeobtainedfromgoodbooksellersorfromCambridge
d
te UniversityPress.Foracompleteserieslistingvisit
t
i
rm http://www.cambridge.org/uk/series/sSeries.asp?code=EOM
e
p
es 80 O.StormarkLie’sStructuralApproachtoPDESystems
us 81 C.F.DunklandY.XuOrthogonalPolynomialsofSeveralVariables
ir 82 J.P.MayberryTheFoundationsofMathematicsintheTheoryofSets
a
f 83 C.Foiasetal.Navier–StokesEquationsandTurbulence
pt 84 B.PolsterandG.F.SteinkeGeometriesonSurfaces
e
xc 85 R.B.ParisandD.KaminskiAsymptoticsandMellin–BarnesIntegrals
e 86 R.McElieceTheTheoryofInformationandCoding,2ndedn
,
er 87 B.A.MagurnAnAlgebraicIntroductiontoK-Theory
h
is 88 T.MoraSolvingPolynomialEquationSystemsI
bl 89 K.BichtelerStochasticIntegrationwithJumps
u
p 90 M.LothaireAlgebraicCombinatoricsonWords
e
h 91 A.A.IvanovandS.V.ShpectorovGeometryofSporadicGroupsII
t
m 92 P.McMullenandE.SchulteAbstractRegularPolytopes
o
fr 93 G.Gierzetal.ContinuousLatticesandDomains
n 94 S.R.FinchMathematicalConstants
o
si 95 Y.JabriTheMountainPassTheorem
s
i 96 G.GasperandM.RahmanBasicHypergeometricSeries,2ndedn
m
er 97 M.C.PedicchioandW.Tholen(eds.)CategoricalFoundations
p
t 98 M.E.H.IsmailClassicalandQuantumOrthogonalPolynomialsinOneVariable
ou 99 T.MoraSolvingPolynomialEquationSystemsII
h
it 100 E.OlivieriandM.Eula´liaVaresLargeDeviationsandMetastability
w
101 A.Kushner,V.LychaginandV.RubtsovContactGeometryandNonlinearDifferentialEquations
m
or 102 L.W.BeinekeandR.J.Wilson(eds.)withP.J.CameronTopicsinAlgebraicGraphTheory
f
y 103 O.J.StaffansWell-PosedLinearSystems
an 104 J.M.Lewis,S.LakshmivarahanandS.K.DhallDynamicDataAssimilation
in 105 M.LothaireAppliedCombinatoricsonWords
d 106 A.MarkoeAnalyticTomography
e
uc 107 P.A.MartinMultipleScattering
d
ro 108 R.A.BrualdiCombinatorialMatrixClasses
ep 109 J.M.BorweinandJ.D.VanderwerffConvexFunctions
r
e 110 M.-J.LaiandL.L.SchumakerSplineFunctionsonTriangulations
b
111 R.T.CurtisSymmetricGenerationofGroups
t
no 112 H.Salzmannetal.TheClassicalFields
ay 113 S.PeszatandJ.ZabczykStochasticPartialDifferentialEquationswithLe´vyNoise
M 114 J.BeckCombinatorialGames
.
ed 115 L.BarreiraandY.PesinNonuniformHyperbolicity
v
er 116 D.Z.ArovandH.DymJ-ContractiveMatrixValuedFunctionsandRelatedTopics
es 117 R.Glowinski,J.-L.LionsandJ.HeExactandApproximateControllabilityforDistributedParameter
r
s Systems
ht 118 A.A.BorovkovandK.A.BorovkovAsymptoticAnalysisofRandomWalks
g
ri 119 M.DezaandM.DutourSikiric´GeometryofChemicalGraphs
ll 120 T.NishiuraAbsoluteMeasurableSpaces
A 121 M.PrestPurity,SpectraandLocalisation
.
ss 122 S.KhrushchevOrthogonalPolynomialsandContinuedFractions
re 123 H.NagamochiandT.IbarakiAlgorithmicAspectsofGraphConnectivity
P
y 124 F.W.KingHilbertTransformsI
t
si 125 F.W.KingHilbertTransformsII
© 2010. Cambridge Univerpplicable copyright law. 111111111333332222012347968 THTGPYMJOL...h......BKGeCWMSCGoeo.rca.rraorrhFlsyaBnmrimtabnieeemtairliiias,udcnoacnDpotenthdnokR.daieeDenPStPMldaet.a.a-onroCtLDlrcid.dioh..n.AuRnaHCWlgaas.ehangtl.sJimadrcM.MneomWCgCgvaaaee.ottiShrtulrRniuseloE(toabemrennnuo-dFRadtlFs(eitoie.nauine)cmdinnmatsBsdecuo.aot)erPMinoprowrnlhanCeeiiitstaacoshhinnmdesJiemGFo.RsuanLeiantno.NincgmcGdtuasiermolAotrnMbusyssetooradmnSedaylitsnTateg.mWs.aTnudckAerritThompeictiscinTopologicalGraph
ta
ghr 135 V.Berthe´andM.Rigo(eds.)Combinatorics,AutomataandNumberTheory
ri o 136 A.Krista´ly,V.D.Ra˘dulescuandC.VargaVariationalPrinciplesinMathematicalPhysics,Geometry,
y.
op.S andEconomics
CU
EBSCO Publishing : eBook Academic Collection Trial - printed on 5/26/2020 3:28 AM via INCHEON NATIONAL
UNIVERSITY
AN: 511701 ; Kornerup, Peter, Matula, David W..; Finite Precision Number Systems and Arithmetic
Account: inchonun
r
e
d
n
u encyclopedia of mathematics and its applications
d
e
t
t
i
m
r
pe Finite Precision Number Systems
s
e
s
u
r and Arithmetic
i
a
f
t
p
e
c
x
e
,
r
e
h
s
i PETER KORNERUP
l
b
u
p UniversityofSouthernDenmark,Odense
e
h
t
m
ro DAVID W. MATULA
f
on SouthernMethodistUniversity,Dallas
i
s
s
i
m
r
e
p
t
u
o
h
t
i
w
m
r
o
f
y
n
a
n
i
d
e
c
u
d
o
r
p
e
r
e
b
t
o
n
y
a
M
.
d
e
v
r
e
s
e
r
s
t
h
g
i
r
l
l
A
.
s
s
e
r
P
y
t
i
s
r
© 2010. Cambridge Univeplicable copyright law.
p
ta
h
gr
io
r
y.
pS
o.
CU
EBSCO Publishing : eBook Academic Collection Trial - printed on 5/26/2020 3:28 AM via INCHEON NATIONAL
UNIVERSITY
AN: 511701 ; Kornerup, Peter, Matula, David W..; Finite Precision Number Systems and Arithmetic
Account: inchonun
r
e
d
n
u
d
e
t
t
i
m
r
e
p
s
e
s
u
r
i
a
f
t
p
ce cambridge university press
ex Cambridge,NewYork,Melbourne,Madrid,CapeTown,Singapore,
r, Sa˜oPaulo,Delhi,Dubai,Tokyo,MexicoCity
e
h
is CambridgeUniversityPress
l
ub TheEdinburghBuilding,CambridgeCB28RU,UK
p
he PublishedintheUnitedStatesofAmericabyCambridgeUniversityPress,NewYork
t
m
o
fr www.cambridge.org
n Informationonthistitle:www.cambridge.org/9780521761352
o
i
s
s
mi (cid:1)C P.KornerupandD.W.Matula2010
r
e
p
t Thispublicationisincopyright.Subjecttostatutoryexception
u
ho andtotheprovisionsofrelevantcollectivelicensingagreements,
t
wi noreproductionofanypartmaytakeplacewithoutthewritten
rm permissionofCambridgeUniversityPress.
o
f
ny Firstpublished2010
a
n
i
d PrintedintheUnitedKingdomattheUniversityPress,Cambridge
e
c
u
od AcatalogrecordforthispublicationisavailablefromtheBritishLibrary
r
p
e
r
e LibraryofCongressCataloginginPublicationdata
b
t Kornerup,Peter.
no Finiteprecisionnumbersystemsandarithmetic/PeterKornerup,DavidW.Matula.
ay p. cm.–(Encyclopediaofmathematicsanditsapplications;133)
M
. Includesbibliographicalreferencesandindexes.
d
ve ISBN978-0-521-76135-2
er 1.Arithmetic–Foundations. I.Matula,DavidW. II.Title.
s
re QA248.K627 2010
ts 513–dc22 2010030521
h
g
i
r
ISBN978-0-521-76135-2Hardback
l
l
A
s. Additionalresourcesforthispublicationatwww.cambridge.org/9780521761352
s
e
r
P
y
t
i
s
r
© 2010. Cambridge Univepplicable copyright law. aCccaiunmratbhcriyisdogpfweuUbeUlbRincsLiaivttseeiosrfsoniisr,t,yaeonxPrdtrewedrsnioslalelhsraoensmrontathoiginrurd,ea-asrpcpaaconruntterysaeitibentihtloeiatrrtynaaefpnotpyrwrctoehopbenrsitpiaetetenersts.iorsentfeesnrucrceehdotro
ta
h
gr
io
r
y.
pS
o.
CU
EBSCO Publishing : eBook Academic Collection Trial - printed on 5/26/2020 3:28 AM via INCHEON NATIONAL
UNIVERSITY
AN: 511701 ; Kornerup, Peter, Matula, David W..; Finite Precision Number Systems and Arithmetic
Account: inchonun
r
e
d
un CONTENTS
d
e
t
t
i
m
r
e
p
s
e
s
u
r
i
a
f
t
p
e
c
x
e
,
r
e
h
s
i
l
b
u
p
e
h
t
m
o
r
f
n
o
si Preface page xi
s
i
m
r
e
p
t 1 Radixpolynomialrepresentation 1
u
o
th 1.1 Introduction 1
i
w
m 1.2 Radixpolynomials 2
r
o
f 1.3 Radix-β numbers 7
y
n
a 1.4 Digitsymbolsanddigitstrings 10
n
i
d 1.5 Digitsetsforradixrepresentation 14
e
c
du 1.6 Determiningaradixrepresentation 20
o
r
ep 1.7 Classifyingbase-digitsetcombinations 31
r
be 1.8 Finite-precisionandcomplementrepresentations 35
t
no 1.8.1 Finite-precisionradix-complementrepresentations 38
y
Ma 1.9 Radix-β approximationandroundings 43
.
ed 1.9.1 Bestradix-β approximations 43
v
r
se 1.9.2 Roundingintofiniterepresentations 47
e
r
s 1.10 Otherweightedsystems 50
t
h
ig 1.10.1 Mixed-radixsystems 50
r
ll 1.10.2 Two-levelradixsystems 52
A
s. 1.10.3 Double-radixsystems 52
s
e
Pr 1.11 Notesontheliterature 54
y
t
i
rs 2 Baseanddigitsetconversion 59
© 2010. Cambridge Univeplicable copyright law. 2222....3241 BDI22Cn..aoi44tgsrn..o2ie1vt/dersuarescdtiLCtioicxioanomrncnriiovyntneetdovdresencitroeoasrnirnmor-fynroienprderrudoenpdbdauyagnnatdhttaiedoninrtgigsityhsstetcetosmnstext 566778906570
p
ta
h
gr
io
r
y.
pS
o.
CU
EBSCO Publishing : eBook Academic Collection Trial - printed on 5/26/2020 3:28 AM via INCHEON NATIONAL
UNIVERSITY
AN: 511701 ; Kornerup, Peter, Matula, David W..; Finite Precision Number Systems and Arithmetic
Account: inchonun
vi Contents
er 2.4.3 Conversionintoacontiguousdigitset 83
d
un 2.4.4 Conversionintocanonical,non-adjacentform 92
d
te 2.5 Implementingbaseanddigitsetconversions 95
t
i
rm 2.5.1 Implementationinlogic 103
e
p
s 2.5.2 On-linedigitsetconversion 108
e
s
u 2.6 Theadditiveinverse 111
r
i
fa 2.7 Notesontheliterature 115
t
p
e
c
x 3 Addition 119
e
r, 3.1 Introduction 119
e
h
is 3.2 Howfastcanwecompute? 120
l
b
pu 3.3 Digitaddition 125
e
th 3.4 Additionwithredundantdigitsets 129
m
ro 3.5 Basiclinear-timeadders 136
f
on 3.5.1 Digitserialandon-lineaddition 144
i
s
is 3.6 Sub-lineartimeadders 147
m
r
pe 3.6.1 Carry-skipadders 148
t
ou 3.6.2 Carry-selectadders 149
h
t
wi 3.6.3 Carry-look-aheadadders 151
m
or 3.7 Constant-timeadders 159
f
ny 3.7.1 Carry-saveaddition 159
a
in 3.7.2 Borrow-saveaddition 163
d
ce 3.8 Additionandoverflowinfiniteprecisionsystems 165
u
d
ro 3.8.1 Additioninredundantdigitsets 165
p
e
r 3.8.2 Additioninradix-complementsystems 169
e
b
t 3.8.3 1’scomplementaddition 171
o
n
y 3.8.4 2’scomplementcarry-saveaddition 173
a
M
. 3.9 Subtractionandsign-magnitudeaddition 177
d
e
rv 3.9.1 Sign-magnitudeadditionandsubtraction 180
e
s
re 3.9.2 Bit-serialsubtraction 183
s
ht 3.10 Comparisons 184
g
i
r 3.10.1 Equalitytesting 185
l
l
A 3.10.2 Orderingrelations 188
.
s
es 3.10.3 Leadingzeroesdetermination 192
r
P
y 3.11 Notesontheliterature 200
t
i
s
r
© 2010. Cambridge Univeplicable copyright law. 4 44M4...312ultipIC44Rln..ile33ctarca..so12otsddiioufiinnccRRgtaitoaaaiddnoniindxx--op24farmmmtiuuualllltttpiiippprllloiiidcceaarusttciitoonngeneration 222222001110781247
t ap 4.3.3 High-radixmultiplication 217
h
gr
io
r
y.
pS
o.
CU
EBSCO Publishing : eBook Academic Collection Trial - printed on 5/26/2020 3:28 AM via INCHEON NATIONAL
UNIVERSITY
AN: 511701 ; Kornerup, Peter, Matula, David W..; Finite Precision Number Systems and Arithmetic
Account: inchonun
Contents vii
er 4.4 Sign-magnitudeandradix-complementmultiplication 220
d
un 4.4.1 Mappingintounsignedoperands 221
d
te 4.4.2 2’scomplementoperands 222
t
i
rm 4.4.3 TheBaughandWooleyscheme 222
e
p
s 4.4.4 Usingarecodedmultiplier 224
e
s
u 4.5 Linear-timemultipliers 227
r
i
fa 4.5.1 Theclassicaliterativemultiplier 228
t
ep 4.5.2 Arraymultipliers 229
c
x
e 4.5.3 LSB-firstserial/parallelmultipliers 231
,
r
he 4.5.4 Apipelinedserial/parallelmultiplier 237
s
i
l
b 4.5.5 Least-significantbitfirst(LSB-first)serial/serial
u
p
e multipliers 241
h
t
m 4.5.6 On-lineormost-significantbitfirst(MSB-first)
o
r
f multipliers 248
n
o
si 4.6 Logarithmic-timemultiplication 252
s
i
rm 4.6.1 Integermultiplierswithoverflowdetection 258
e
p
t 4.7 Squaring 262
u
o
th 4.7.1 Radix-2squaring 263
i
w
m 4.7.2 Recodedradix-4squaring 264
r
o
f 4.7.3 Radix-4squaringbyoperanddualrecoding 266
y
n
a 4.8 Notesontheliterature 269
n
i
d
ce 5 Division 275
u
d
ro 5.1 Introduction 275
p
e
r 5.2 Surveyofdivisionandreciprocalalgorithms 277
e
b
t 5.2.1 Digit-serialalgorithms 279
o
n
y 5.2.2 Iterativerefinementalgorithms 281
a
M
. 5.2.3 Resourcerequirements 282
d
e
rv 5.2.4 Reciprocallook-upalgorithms 283
e
s
re 5.3 Quotientsandremainders 284
s
ht 5.3.1 Integerquotient,remainderpairs 284
g
i
r 5.3.2 Radix-β quotient,remainderpairs 287
l
l
A 5.3.3 Convertingbetweenradix-β quotient,remainder
.
s
es pairs 289
r
P
y 5.4 Deterministicdigit-serialdivision 292
t
i
rs 5.4.1 Restoringdivision 293
© 2010. Cambridge Univeplicable copyright law. 5.5 S55555.....R54454T.....12423diviRBDNFsuioiioongnbnnaide-trrarysetmessSolteeoRnncrTttidainoildgasnigvdoriifasvmiSiosRsnioTndivision 223333990001785780
p
ta
h
gr
io
r
y.
pS
o.
CU
EBSCO Publishing : eBook Academic Collection Trial - printed on 5/26/2020 3:28 AM via INCHEON NATIONAL
UNIVERSITY
AN: 511701 ; Kornerup, Peter, Matula, David W..; Finite Precision Number Systems and Arithmetic
Account: inchonun
viii Contents
er 5.5.3 Exploitingsymmetries 321
d
un 5.5.4 Digitselectionbydirectcomparison 324
d
te 5.5.5 Digitselectionbytablelook-up 325
t
i
rm 5.5.6 ArchitecturesforSRTdivision 326
e
p
s 5.6 Multiplicativehigh-radixdivision 329
e
s
u 5.6.1 Shortreciprocaldivision 330
r
i
fa 5.6.2 Prescaleddivision 334
t
ep 5.6.3 Prescaleddivisionwithremainder 338
c
x
e 5.6.4 Efficiencyofmultiplicativehighradixdivision 342
,
r
he 5.7 Multiplicativeiterativerefinementdivision 344
s
i
bl 5.7.1 Newton–Raphsondivision 346
u
p
e 5.7.2 Convergencedivision 350
h
t
m 5.7.3 Postscaleddivision 354
o
r
f 5.7.4 Efficiencyofiterativerefinementdivision 359
n
o
si 5.8 Tablelook-upsupportforreciprocals 361
s
i
rm 5.8.1 Directtablelook-up 363
e
p
t 5.8.2 Ulpaccurateandmonotonicreciprocal
u
o
th approximations 370
i
w
m 5.8.3 Bipartitetables 375
r
o
f 5.8.4 Linearandquadraticinterpolation 383
y
n
a 5.9 Notesontheliterature 390
n
i
d
ce 6 Squareroot 398
u
d
ro 6.1 Introduction 398
p
e
r 6.2 Rootsandremainders 400
e
b
t 6.3 Digit-serialsquareroot 402
o
n
y 6.3.1 Restoringandnon-restoringsquareroot 404
a
M
. 6.3.2 SRTsquareroot 407
d
e
rv 6.3.3 CombiningSRTsquarerootwithdivision 409
e
s
re 6.4 Multiplicativehigh-radixsquareroot 416
s
ht 6.4.1 Shortreciprocalsquareroot 419
g
i
r 6.4.2 Prescaledsquareroot 422
l
l
A 6.5 Iterativerefinementsquareroot 426
.
s
es 6.5.1 Newton–Raphsonsquareroot 428
r
P
y 6.5.2 Newton–Raphsonroot-reciprocal 432
t
i
rs 6.5.3 Convergencesquareroot 434
© 2010. Cambridge Univeplicable copyright law. 7 F677...l261oatinNI6Fng.lo5to-rpt.ao4eotsdiinunogctnE-tniptxohouaneimcntltibatfeenarrcdatstoduyrirsirezteeacmttieosdnoanned-unloprmroaoltiszation 444443445473707
t ap 7.2.1 Floating-pointnumberfactorization 450
h
gr
io
r
y.
pS
o.
CU
EBSCO Publishing : eBook Academic Collection Trial - printed on 5/26/2020 3:28 AM via INCHEON NATIONAL
UNIVERSITY
AN: 511701 ; Kornerup, Peter, Matula, David W..; Finite Precision Number Systems and Arithmetic
Account: inchonun