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 50
50
public class MathGuards {
51
51
52
52
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 ;
54
54
}
55
55
56
56
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) {
142
142
"\n [Graal, " + Truffle .getRuntime ().getName () + ", Java " + System .getProperty ("java.version" ) + "]" );
143
143
// the default values taken from JPython
144
144
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
156
156
}));
157
157
builtinConstants .put ("maxunicode" , IntegerFormatter .LIMIT_UNICODE .intValue () - 1 );
158
158
You can’t perform that action at this time.
0 commit comments