mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Patch #1725 by Mark Dickinson, fixes incorrect conversion of -1e1000
and adds errors for -0x.
This commit is contained in:
parent
54966a5f94
commit
3b83549ea0
3 changed files with 65 additions and 22 deletions
|
|
@ -121,6 +121,13 @@ class IEEEFormatTestCase(unittest.TestCase):
|
|||
self.assertEquals(pos_pos(), neg_pos())
|
||||
self.assertEquals(pos_neg(), neg_neg())
|
||||
|
||||
if float.__getformat__("double").startswith("IEEE"):
|
||||
def test_underflow_sign(self):
|
||||
import math
|
||||
# check that -1e-1000 gives -0.0, not 0.0
|
||||
self.assertEquals(math.atan2(-1e-1000, -1), math.atan2(-0.0, -1))
|
||||
self.assertEquals(math.atan2(float('-1e-1000'), -1),
|
||||
math.atan2(-0.0, -1))
|
||||
|
||||
class ReprTestCase(unittest.TestCase):
|
||||
def test_repr(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue