Re: Magic numbers
As you don't say what your results were who knows?From: Yago Alvarado <Yago.Alvarado@xxxxxxxxxxxxxx> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: "'XSL-List@xxxxxxxxxxxxxxxxxxxxxx'" <XSL-List@xxxxxxxxxxxxxxxxxxxxxx> Subject: Magic numbers Date: Tue, 18 Nov 2003 12:54:49 -0000
My guess is you got 7.00000000000000001 or 6.9999999999999. This is because binary representation of some decimals using standard techniques is impossibe, similarly to expressing one third in decimal.
You either have to use integer arithmetic, in this case '100 * 7 div 100' or round your answers.
Joe (MVP - xml)
Tired of 56k? Get a FREE BT Broadband connection http://www.msn.co.uk/specials/btbroadband
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format