File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 def __hash__ (self ):
99 return 1 << 70 | 1
1010print (hash (F ()) != 0 )
11+
12+ # this had a particular error with internal integer arithmetic of hash function
13+ print (hash (6699999999999999999999999999999999999999999999999999999999999999999999 ) != 0 )
Original file line number Diff line number Diff line change 33# these should hash to an integer with a specific value
44for val in (
55 '0.0' ,
6+ '-0.0' ,
67 '1.0' ,
78 '2.0' ,
89 '-12.0' ,
1516 '0.1' ,
1617 '-0.1' ,
1718 '10.3' ,
19+ '0.4e3' ,
1820 '1e16' ,
1921 'inf' ,
2022 '-inf' ,
Original file line number Diff line number Diff line change 2424print (float ('1.00000000000000000000e-37' ))
2525print (float ('10.0000000000000000000e-38' ))
2626print (float ('100.000000000000000000e-39' ))
27+
28+ # very large exponent literal
29+ print (float ('1e4294967301' ))
30+ print (float ('1e-4294967301' ))
31+ print (float ('1e18446744073709551621' ))
32+ print (float ('1e-18446744073709551621' ))
You can’t perform that action at this time.
0 commit comments