On Mon, Mar 10, 2014 at 7:08 PM, Tim Peters
Looks like Mike C's intent was that
+x
act like
Decimal(0) + x [...]
Yes, I'm pretty sure that's what he intended. It's clearly spelled out in the standard: "the operations plus(a) and minus(a) (where a and b refer to any numbers) are calculated as the operations add(’0’, a) and subtract(’0’, b)respectively", but not in our docs. Can't win! That -x loses the sign when x is a positive 0 (under most
rounding modes) is jarring; but that the results of "-x" and "0-x" may not be the same would also be jarring.
Hmm. I find the second option a lot less jarring than the first, but maybe that's because I'm used to it (and because I'm too young to really remember non-IEEE floating-point formats; the only one I really encountered was the Sinclair ZX81's 40-bit format). Not a fan of signed zeroes :-(
Yeah, me neither, but with IEEE 754 world domination it looks like they're here to stay. Mark