shithub: libmujs

Download patch

ref: 375c8a8e08d84b66d8daf0ab211ceea49ee7b9ef
parent: 8f87c0a8429785a473e4e98054a32ae3c721df07
author: Tor Andersson <tor@ccxvii.net>
date: Thu Mar 13 10:48:39 EDT 2014

Use explicit MAX/MIN_VALUE constants.

DBL_MIN is bigger than 5e-324 which is given in the spec.

--- a/jsnumber.c
+++ b/jsnumber.c
@@ -83,8 +83,8 @@
 	}
 	js_newcconstructor(J, jsB_Number, jsB_new_Number, 1);
 	{
-		jsB_propn(J, "MAX_VALUE", DBL_MAX);
-		jsB_propn(J, "MIN_VALUE", DBL_MIN);
+		jsB_propn(J, "MAX_VALUE", 1.7976931348623157e+308);
+		jsB_propn(J, "MIN_VALUE", 5e-324);
 		jsB_propn(J, "NaN", NAN);
 		jsB_propn(J, "NEGATIVE_INFINITY", -INFINITY);
 		jsB_propn(J, "POSITIVE_INFINITY", INFINITY);