xsl-list
[Top] [All Lists]

Re: [xsl] XPath MOD 10 calculation

2007-05-25 13:36:49


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. 
________________________________________________________________________

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>