Commit b2e8eff0 authored by Boxiang Sun's avatar Boxiang Sun

use float_info instead hard code

parent 23ed1a34
......@@ -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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment