A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2001-March/013788.html below:

[Python-Dev] test_coercion failing

[Python-Dev] test_coercion failing [Python-Dev] test_coercion failingTim 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.




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4