mirror of
https://github.com/python/cpython.git
synced 2025-12-09 02:35:14 +00:00
Reverting the "unixware7" patch: atan2(0, 1) should be 0, regardless of
platform. If it returns pi on the unixware7 platform, they have a bug in their libm atan2.
This commit is contained in:
parent
ac6985f42f
commit
4642cb9ac9
1 changed files with 1 additions and 5 deletions
|
|
@ -1,7 +1,6 @@
|
||||||
# Python test set -- math module
|
# Python test set -- math module
|
||||||
# XXXX Should not do tests around zero only
|
# XXXX Should not do tests around zero only
|
||||||
|
|
||||||
import sys
|
|
||||||
from test_support import *
|
from test_support import *
|
||||||
|
|
||||||
seps='1e-05'
|
seps='1e-05'
|
||||||
|
|
@ -36,10 +35,7 @@ testit('atan(1)', math.atan(1), math.pi/4)
|
||||||
print 'atan2'
|
print 'atan2'
|
||||||
testit('atan2(-1, 0)', math.atan2(-1, 0), -math.pi/2)
|
testit('atan2(-1, 0)', math.atan2(-1, 0), -math.pi/2)
|
||||||
testit('atan2(-1, 1)', math.atan2(-1, 1), -math.pi/4)
|
testit('atan2(-1, 1)', math.atan2(-1, 1), -math.pi/4)
|
||||||
if sys.platform in ['unixware7']:
|
testit('atan2(0, 1)', math.atan2(0, 1), 0)
|
||||||
testit('atan2(0, 1)', math.atan2(0, 1), math.pi)
|
|
||||||
else:
|
|
||||||
testit('atan2(0, 1)', math.atan2(0, 1), 0)
|
|
||||||
testit('atan2(1, 1)', math.atan2(1, 1), math.pi/4)
|
testit('atan2(1, 1)', math.atan2(1, 1), math.pi/4)
|
||||||
testit('atan2(1, 0)', math.atan2(1, 0), math.pi/2)
|
testit('atan2(1, 0)', math.atan2(1, 0), math.pi/2)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue