Subject: Re: [xsl] XPath MOD 10 calculation From: David Carlisle <davidc@xxxxxxxxx> Date: Fri, 25 May 2007 21:36:27 +0100 |
> It's a pleasure to read such a post, thanks! that's as maybe but it was complete nonsense, what comes of writing on this list with with one eye and 1% of brain while stepping through a debugger with the other bits of my head.... Andrew's qestion of why isn't -(-foo mod 10) the same as foo mod 10 should have the answer: it is the same. In the bit of the post that wasn't incorrect I explained that mod in xpath keeps the sign, so (for example) -(-9 mod 10) is 9 as is 9 mod 10. What is true is the fact that to test if $x and $y are equal mod 10 you need to test ($x -$y) mod 10 = 0 rather than ($x mod 10) = ($y mod 10) for the reasons given. sorry keep to xslt in future (clearly I'm better at xslt than sums these days, depite the fact that I have a PhD on operations on integers modulo p:-) David ________________________________________________________________________ The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom. This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. ________________________________________________________________________
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XPath MOD 10 calculation, Manfred Staudinger | Thread | Re: [xsl] XPath MOD 10 calculation, Jesper Tverskov |
Re: [xsl] Grouping and Numbering, David Carlisle | Date | Re: [xsl] Grouping and Numbering, Wendell Piez |
Month |