[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Rounding errors in financial app transforms
Hi Justin,
I've to pointers that I am thinking of, but I don't know if this is what you're after: Have you considered using xs:decimal? Just as an example: xs:float(10.1) - xs:float(9.93) = 0.17000008 xs:double(10.1) - xs:double(9.93) = 0.16999999999999993 xs:decimal(10.1) - xs:decimal(9.93) = 0.17 Ok, this is just a simple example. Rounding errors can occur in a number of ways and I am not aware of your application and how that is normally done. But then, still, how about the added functionality for rounding in XSLT 2.0? Like: fn:round-half-to-even()? Cheers, -- Abel Braaksma Justin Johansson wrote: What's the recommended recipe to avoid rounding-error discrepancies in financial applications based upon XSLT (2.0) transforms?
|
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
|