[Python-bugs-list] [ python-Bugs-458941 ] Looks like a unary minus bug

noreply@sourceforge.net noreply@sourceforge.net
Wed, 05 Sep 2001 16:29:10 -0700


Bugs item #458941, was opened at 2001-09-05 16:29
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=458941&group_id=5470

Category: Parser/Compiler
Group: Python 2.2
Status: Open
Resolution: None
Priority: 6
Submitted By: Tim Peters (tim_one)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: Looks like a unary minus bug

Initial Comment:
The attached program should print the same stuff in 
both calls to drive().  It actually prints

Using literals:
0.0
0.0
0.0
0.0

Using computation:
0.0
3.14159265359
0.0
-3.14159265359

on Windows.

The disassembly of driver() suggests the compiler is 
optimizing

-0.0

into

0.0, but the sign of a *floating* zero is significant.

This works as expected in 2.1.1; the behavior changed 
after that.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=458941&group_id=5470