[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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. ________________________________________________________________________
|
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
|