[xsl] single precision bug

Subject: [xsl] single precision bug
From: "ronald" <ronald@xxxxxxxxxxx>
Date: Tue, 17 Aug 2004 14:37:24 +0200
Hi there,

I have run into something people here call the "single precision bug"

A rather large XML file containing all kinds of financ. information is being
validated using schematron.

the test I do is as follows:

totalDebit = sum(.//debitAmount)"

meaning: there is an element named totalDebit that should have the same
value as the sum of all debitamount elements in the file.

I happen to know this is the case, the test however fails.

A better inspection learns me that the XSLT processor makes a mistake here
totalDebit - sum(./debitAmount) gives me a value of:

-0.00000000005820766091346741 whereas this should be 0.

MsXML, Saxon,Xalan, XT all have this error only Sablotron returns the
correct value.

What do you all think of this?

Cheers

Ronald





---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.735 / Virus Database: 489 - Release Date: 6-8-2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.735 / Virus Database: 489 - Release Date: 6-8-2004

Current Thread