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

Re: Rounding errors in financial app transforms

Subject: Re: Rounding errors in financial app transforms
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 26 Jul 2007 14:16:59 +0100
Re:  Rounding errors in financial app transforms
> what's the recommended recipe to avoid rounding-error discrepancies
> in financial applications based upon XSLT (2.0) transforms?

using decimal rather than double would be a start.That's essentially
large precision arithmetic, although of course division is still a
problem.


On the other hand if you really want to emulate BCD arithmetic exactly
it's probably not too hard to come up with a set of xsl functions that
do that using integer internally. 

> My guess is that even having a standard MulDiv function in XSLT
> wuld help matters floating-point-wise but sadly there is no such
> animal available.

Not really thought about it, but if doing decimal or integer arithemtic
rather than double arithmetic, isn't muldiv the same as the naive
operation of doing the multiplication and then dividing?

David


________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________

Current Thread

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
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.