On Tue, Mar 20, 2001 at 10:33:15PM -0500, Tim Peters wrote: > 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. On BSDI (both 4.0 (gcc 2.7.2.1) and 4.1 (egcs 1.1.2 (2.91.66)) as well as FreeBSD 4.2 (gcc 2.95.2): >>> x = 0.0 >>> print "%.17g" % -x 0 >>> print "%+.17g" % -x +0 Note that neither use GNU libc even though they use gcc. -- Thomas Wouters <thomas@xs4all.net> Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
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