OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Avoiding roundoff errors in calculations?

[ Lists Home | Date Index | Thread Index ]

there are techniques to manage error if it really matters. i used them
to keep the error in the solution of differential equations to a small,
and maximum amount over time. can't take credit for the technique - Dr
Phil Mcrea among others has that privilege.

paraphrased you can always eliminate the calculation error if you
calculate to a higher precision such that the error is not in the
significant digits and then store the significant digits only.

so eg if you need 15 significant digits (enough for most financial
calculations) calculate to at least 17, but round off the intermediate
results to 15 so that each intermediate result is accurate.

there are always accuracy issues, but the fact that nonrepeating real
numbers in one base are repeating ones in another is a real nuisance and
another reason why i use all character data, not floats, doubles, not
even integers for storage.

hope this helps

rick

On Sat, 2003-08-30 at 06:47, Roger L. Costello wrote:
> Hi Tim,
>  
> > I'm curious; what applications require more precision than IEEE double? -Tim
> 
> Good point.  Probably none that I need to be concerned about.
> 
> I think that the problem comes when the result of one calculation gets
> fed into another computation, which gets fed into another computation,
> etc.  Each computation introduces a roundoff error.  Soon there is far
> less than IEEE double precision.  /Roger
> 
> 
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
> 
> The list archives are at http://lists.xml.org/archives/xml-dev/
> 
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://lists.xml.org/ob/adm.pl>





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS