Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
b2e8eff0
Commit
b2e8eff0
authored
Aug 17, 2015
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use float_info instead hard code
parent
23ed1a34
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
from_cpython/Lib/test/test_float.py
from_cpython/Lib/test/test_float.py
+1
-3
No files found.
from_cpython/Lib/test/test_float.py
View file @
b2e8eff0
...
...
@@ -77,9 +77,7 @@ class GeneralFloatCases(unittest.TestCase):
# Check that floats within the range of an int convert to type
# int, not long. (issue #11144.)
boundary
=
float
(
sys
.
maxint
+
1
)
# TODO: hard code for now, need fix then finish the sys.
epsilon
=
2
**
53
*
boundary
# epsilon = 2**-sys.float_info.mant_dig * boundary
epsilon
=
2
**-
sys
.
float_info
.
mant_dig
*
boundary
# These 2 floats are either side of the positive int/long boundary on
# both 32-bit and 64-bit systems.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment