xsl-list
[Top] [All Lists]

Re: XSLT 2.0 Decimal number silliness

2004-03-25 10:19:49
Andreas L. Delmelle wrote:
-----Original Message-----
From: Andreas L. Delmelle [mailto:a_l(_dot_)delmelle(_at_)pandora(_dot_)be]


-----Original Message-----
From: Jeff Kenton [mailto:jkenton(_at_)datapower(_dot_)com]


<snip />

Both lines of output should be equal.  There's got to be
something better.  At least allow specification of number of
fraction digits.

Just to be curious, does

<xsl:value-of select="2.000 div 3.000" />
<xsl:value-of select="0.4 div 0.6" />

make a difference?

I'm guessing the number of significant digits is related to the number
specified in the operands...

That gets you:

0.666666666666666667~
0.66666666666666666667~

It seems to know about trailing zeros.  But the two answers are still different.

--jeff