[Python-Dev] test_coercion failing

Flying Cougar Burnette tommy@ilm.com
Tue, 20 Mar 2001 23:27:12 -0800 (PST)


I get the same ("0" then "+0") on my irix65 O2.  test_coerce succeeds
as well.


Tim Peters writes:
| 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.
| 
| 
| _______________________________________________
| Python-Dev mailing list
| Python-Dev@python.org
| http://mail.python.org/mailman/listinfo/python-dev