|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Avoiding roundoff errors in calculations?
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>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








