Message94418
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
---------------------------------------------------------------------- |
|
Date |
User |
Action |
Args |
2009-10-24 14:13:16 | mancausoft | set | recipients:
+ mancausoft, loewis, aleax, rhettinger, mark.dickinson, ggenellina, christian.heimes |
2009-10-24 14:13:16 | mancausoft | set | messageid: <1256393596.7.0.974948702192.issue1678380@psf.upfronthosting.co.za> |
2009-10-24 14:13:15 | mancausoft | link | issue1678380 messages |
2009-10-24 14:13:15 | mancausoft | create | |
|