[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Avoiding roundoff errors in calculations?


round off error
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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.