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

[Q] Sum Function

Subject: [Q] Sum Function
From: Jonathan Calvert <jonathan_calvert@xxxxxxxxx>
Date: Thu, 1 Nov 2001 06:02:38 -0800 (PST)
q sum
Hi.

I have a serious problem with the XPath Sum function. 
Am I using it incorrectly?  Should I use an
alternative method for my sum calculation.  Thanks in
advance for the help!

<Amount>10.00</Amount> 
<Amount>1.00</Amount> 
<Amount>2.76</Amount> 
<Amount>1.20</Amount> 
<Amount>1.41</Amount>  

Total should be 16.37

but,

<xsl:value-of select="sum($BatchPayments/Amount)"/>

calculates the value as 16.369999999999997

I do not think it matters, but this is on a Sun box
using Xalan and Xerces.

--Jonathan

__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.