This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mancausoft
Recipients aleax, christian.heimes, ggenellina, loewis, mancausoft, mark.dickinson, rhettinger
Date 2009-10-24.14:13:14
SpamBayes Score 5.9868796e-07
Marked as misclassified No
Message-id <1256393596.7.0.974948702192.issue1678380@psf.upfronthosting.co.za>
In-reply-to
Content
This bug is still present on arm. 

Python 2.6.3 

cs-e9302# cat ../prova.py
import  math
print math.atan2(0., -0.)
print (math.copysign(4., -0.), -4.0)
print math.atan2(0., -0.)
print (math.copysign(4., -0.), -4.0)
print math.atan2(0., -0.)

cs-e9302# cat ../prova1.py
import  math
print (math.copysign(4., -0.), -4.0)
print math.atan2(0., -0.)
print (math.copysign(4., -0.), -4.0)
print math.atan2(0., -0.)

cs-e9302# ./python ../prova1.py
(-4.0, -4.0)
-3.14159265359
(-4.0, -4.0)
-3.14159265359
cs-e9302# ./python ../prova.py
0.0
(4.0, -4.0)
0.0
(4.0, -4.0)
0.0




>>> from math import atan2
>>> x = -0.
>>> y = 0.
>>> print atan2(y, -1.)
3.14159265359
>>> exec("from math import atan2; x = -0.; y = 0.; print atan2(y,
-1.)")
-3.14159265359
>>> x = -0.; atan2(0., -1)
-3.1415926535897931
>>> x = 0.; atan2(0., -1)
3.1415926535897931

======================================================================
FAIL: testAtan2 (__main__.MathTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_math.py", line 131, in testAtan2
    self.ftest('atan2(0., -0.)', math.atan2(0., -0.), math.pi)
  File "Lib/test/test_math.py", line 57, in ftest
    (name, value, expected))
AssertionError: atan2(0., -0.) returned 0.0, expected
3.1415926535897931

======================================================================
FAIL: testCopysign (__main__.MathTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_math.py", line 806, in testCopysign
    self.assertEqual(math.copysign(4., -0.), -4.0)
AssertionError: 4.0 != -4.0

----------------------------------------------------------------------
History
Date User Action Args
2009-10-24 14:13:16mancausoftsetrecipients: + mancausoft, loewis, aleax, rhettinger, mark.dickinson, ggenellina, christian.heimes
2009-10-24 14:13:16mancausoftsetmessageid: <1256393596.7.0.974948702192.issue1678380@psf.upfronthosting.co.za>
2009-10-24 14:13:15mancausoftlinkissue1678380 messages
2009-10-24 14:13:15mancausoftcreate