[Python-Dev] test_coercion failing
Tim Peters
tim.one@home.com
Tue, 20 Mar 2001 22:33:15 -0500
Everyone! Run this program under current CVS:
x = 0.0
print "%.17g" % -x
print "%+.17g" % -x
What do you get? WinTel prints "0" for the first and "+0" for the second.
C89 doesn't define the results.
C99 requires "-0" for both (on boxes with signed floating zeroes, which is
virtually all boxes today due to IEEE 754).
I don't want to argue the C rules, I just want to know whether this *does*
vary across current platforms.