xsl-list
[Top] [All Lists]

Re: [xsl] Rounding errors in financial app transforms

2007-07-26 05:57:39
You seem to be un-aware of xs:decimal.



--
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play


On 7/26/07, Justin Johansson <procode(_at_)tpg(_dot_)com(_dot_)au> wrote:
What's the recommended recipe to avoid rounding-error discrepancies
in financial applications based upon XSLT (2.0) transforms?

Having demonstrated a proof-of-concept for an application based on XSLT 2.0
to a commercial finance/accounting industry client (to replace a legacy system
which happens to be written in CBASIC-86), a stumbling block / annoyance is
the
accumulation of one cent errors in the aggregated results.

This, of course, is as a result of using floating-point arithmetic in XSLT.

BCD arithmetic is apparently still used in mainframe applications, as was in
CBASIC-86, but most latter-day languages including XSLT seem to have
ignored it.

Does this means that one needs to resort to doing non-trivial financial
apps in XSLT
in integer arithmetic?

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

Thanks to all for suggestions.

Justin Johansson

*** A horse with no name is called Lambda ***

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--