[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: XSLT 2.0 Decimal number silliness

Subject: RE: XSLT 2.0 Decimal number silliness
From: "Ragulf Pickaxe" <jawxml@xxxxxxxxxxx>
Date: Fri, 26 Mar 2004 08:55:39 +0000
decimal test
Hi,


<xsl:template match="/">~ <xsl:value-of select="2.0 div 3.0" />~ <xsl:value-of select="0.444 div 0.666" />~ </xsl:template>

</xsl:stylesheet>

Using Saxon 7.x, this results in:

<?xml version="1.0" encoding="UTF-8"?>~
0.666666666666666667~
0.666666666666666666666667~

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

--jeff

I am curious how the output would compare if you made a test like:


<xsl:choose>
<xsl:when test="(2.0 div 3.0)=(0.444 div 0.666)">
 They are equal
</xsl:when>
<xsl:otherwise>
 They are not equal
</xsl:otherwise>
</xsl:choose>

Does the number of decimals here affect the outcome?

Regards,
Ragulf Pickaxe :)

_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.