Skip to content

Commit e0b1826

Browse files
committed
Update sys.float_info
1 parent dae9158 commit e0b1826

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/SysModuleBuiltins.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -411,17 +411,16 @@ public void initialize(Python3Core core) {
411411
builtinConstants.put("version", PythonLanguage.VERSION +
412412
" (" + COMPILE_TIME + ")" +
413413
"\n[Graal, " + Truffle.getRuntime().getName() + ", Java " + System.getProperty("java.version") + "]");
414-
// the default values taken from JPython
415414
builtinConstants.put("float_info", factory.createStructSeq(FLOAT_INFO_DESC,
416415
Double.MAX_VALUE, // DBL_MAX
417416
Double.MAX_EXPONENT + 1, // DBL_MAX_EXP
418417
308, // DBL_MIN_10_EXP
419-
Double.MIN_VALUE, // DBL_MIN
420-
Double.MIN_EXPONENT, // DBL_MIN_EXP
418+
Double.MIN_NORMAL, // DBL_MIN
419+
Double.MIN_EXPONENT + 1, // DBL_MIN_EXP
421420
-307, // DBL_MIN_10_EXP
422-
10, // DBL_DIG
421+
15, // DBL_DIG
423422
53, // DBL_MANT_DIG
424-
2.2204460492503131e-16, // DBL_EPSILON
423+
Math.ulp(1.0), // DBL_EPSILON
425424
2, // FLT_RADIX
426425
1 // FLT_ROUNDS
427426
));

0 commit comments

Comments
 (0)