Java Reference
In-Depth Information
arithmetic .Intervalarithmeticisbasedonexecutingaseriesofcalculations
twice:onceroundingupandonceroundingdown.Thisallowsthedetermina-
tionoftheupperandlowerboundsoftheerror.Usingintervalarithmetic,itis
possible,inmanycases,tocertifythatthecorrectresultisavaluenotlarger
thantheresultobtainedwhileroundingup,andnosmallerthantheresultob-
tainedwhileroundingdown.Thisplacestheexactresultwithinacertain
boundary.
AlthoughIEEE754doesnotspecificallymentionintervalarithmetic,it
doesrequiredirectedroundingmodes.Intervalarithmeticcanbeapowerful
numericaltool,althoughthereareexceptionalcasesinwhichtheseresults
arenotvalid.Notallmathematicalcalculationscanbesubjecttointerval
analysis.Thefundamentalrulesareasfollows:
1.Theoperationmustconsistofmultiplesteps.
2.Atleastoneintermediateresultinthecalculationsmustbesubjectto
rounding.
3.Thevaluezeroshouldnotbeintheerrorrange,thatis,bothresultsmusthave
thesamesign.Thesubsequentpossibilityofdivisionbyzeroorbyaverysmall
numberintroducesotherpotentialproblemsthatarenotevidentininterval
arithmetic.
4.Thecalculationsshouldnotbe,inthemselves,amethodforapproximatingre-
sults.Compoundedapproximationsrenderinvalidintervals.
Treatmentofinfinity
Theconceptofinfinityarisesinrelationtotherangeofasystemofrealnum-
bers.Oneapproach,calleda projectiveclosure ,describesinfinityasanun-
signedrepresentationforverysmallorverylargenumbers.Whenprojective
infinityisadopted,thesymbol isusedtorepresentanumberthatiseither
toosmallortoolargetobeencodedinthesystem.
Analternativeapproach,called affineclosure ,recognizesthedifference
betweenvaluesthatexceedthenumbersystembybeingtoolarge(+ )or
toosmall(- )toberepresented. Figure21-2 graphicallyrepresentsthepro-
jective and the affine methods for the closure of a number system.
According to the standard, infinity must be interpreted in the affine sense.
That is, any representable finite number x shall be located
- (x) +
Search WWH ::




Custom Search