|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XPath floating point arithmetic
Hi Can someone ease a bit of confusion for me, please? In relation to XPath, what would the answer be to the following operation: 5.46 mod 2.6 Should it be a) 1 (implying the numbers are rounded to nearest integer, then 'mod'ed) b) 0.26 (implying some sort of floating point mod operation) c) something else (implying I've got my sums wrong and need to learn how to use a calculator) ? The example in the XPath spec only covers integer mods, the spec has a note saying that it *isn't* the same as the IEEE 754 remainder operation (?), and the XSLT Ref 2nd Ed (Michael Kay, p91) says that all operations "behave exactly as specified by IEEE 754". A quick straw poll of the only XPath implementation I had easily to hand (libxml), suggested the correct answer was a) (i.e. 1). Thanks for any help, Richard _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com 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
|

Cart








