Subject: Re: [xsl] XPath floating point arithmetic From: Jeff Kenton <jkenton@xxxxxxxxxxxxx> Date: Wed, 20 Mar 2002 12:10:12 -0500 (EST) |
On Wed, 20 Mar 2002, Richard Jinks wrote: ..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) .. The XPath spec says that mod is exactly equivalent to the Java % operator. If this also means it is the same a the C % operator (I don't have a Java spec handy), C only applies % to integers, suggesting that XSLT would round input values to integers before applying the mod operation. --jeff XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XPath floating point arithmet, Richard Jinks | Thread | Re: [xsl] XPath floating point arit, Elliotte Rusty Harol |
Re: [xsl] Totally OT, B. Tommie Usdin | Date | Re: [xsl] XPath floating point arit, Elliotte Rusty Harol |
Month |