The description of mod uses expressions the expression (a idiv b)*b+(a mod b) that is (one assumes) XPath/Xquery, (although other cases of explict xpath examples the operators have op: or fn: syntax so this probably ought to be op:numeric-multiply(op:numeric-integer-divide(a,b) ,b)... however it also uses the phrase the result obeys (a/b)*b+(a mod b) = a. Division is truncating division, analogous to integer division, not [IEEE 754-1985] rounding division. The expression there is a valid Xpath, but not the desired expression:-) I assume that the second sentence is intended to give a local definition of "/" but a) I think some other syntax should be used in preference to "/" to avoid confusion, and b) I don't think "analogous to integer division" is clear enough as a specification. If a and b are positive I assume you want something equivalent to the Xpath floor(a div b)*b+(a mod b) = a Although It's not clear whether mod should be _defined_ that way in terms of the Xpath floor and div (which may affect certain edge cases). David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________Received on Tuesday, 2 December 2003 12:20:15 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:14:03 GMT