File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 5050public class MathGuards {
5151
5252 public static boolean fitLong (double value ) {
53- return Long .MIN_VALUE <= value && value <= Long .MAX_VALUE ;
53+ return Long .MIN_VALUE < value && value < Long .MAX_VALUE ;
5454 }
5555
5656 public static boolean fitInt (double value ) {
Original file line number Diff line number Diff line change @@ -142,17 +142,17 @@ public void initialize(PythonCore core) {
142142 "\n [Graal, " + Truffle .getRuntime ().getName () + ", Java " + System .getProperty ("java.version" ) + "]" );
143143 // the default values taken from JPython
144144 builtinConstants .put ("float_info" , core .factory ().createTuple (new Object []{
145- Double .MAX_VALUE , // DBL_MAX
146- Double .MAX_EXPONENT , // DBL_MAX_EXP
147- 308 , // DBL_MIN_10_EXP
148- Double .MIN_VALUE , // DBL_MIN
149- Double .MIN_EXPONENT , // DBL_MIN_EXP
150- -307 , // DBL_MIN_10_EXP
151- 10 , // DBL_DIG
152- 53 , // DBL_MANT_DIG
153- 2.2204460492503131e-16 , // DBL_EPSILON
154- 2 , // FLT_RADIX
155- 1 // FLT_ROUNDS
145+ Double .MAX_VALUE , // DBL_MAX
146+ Double .MAX_EXPONENT + 1 , // DBL_MAX_EXP
147+ 308 , // DBL_MIN_10_EXP
148+ Double .MIN_VALUE , // DBL_MIN
149+ Double .MIN_EXPONENT , // DBL_MIN_EXP
150+ -307 , // DBL_MIN_10_EXP
151+ 10 , // DBL_DIG
152+ 53 , // DBL_MANT_DIG
153+ 2.2204460492503131e-16 , // DBL_EPSILON
154+ 2 , // FLT_RADIX
155+ 1 // FLT_ROUNDS
156156 }));
157157 builtinConstants .put ("maxunicode" , IntegerFormatter .LIMIT_UNICODE .intValue () - 1 );
158158
You can’t perform that action at this time.
0 commit comments