At 8:27 PM -0400 4/12/05, John Macdonald wrote:
The mathematical definition of xor for two arguments is "true if
exactly one argument is true, false otherwise".

Yes.

When that gets
generalized to multiple arguments it means "true if an odd number
of the arguments are true, false otherwise".

Is this the official mathematics position?

If not, I would generalize it like this: true If >= 1 arg is true and >= 1 arg is false, otherwise false.

Is that better or worse?

  So, you cannot short
circuit the evaluation because any value, if it happens to be true,
changes the result of the expression.

If my assertion is used, then all you can short circuit once you find a true value and a false value.


Of course, we should go with what the official mathematics standard is.

-- Darren Duncan

Reply via email to