Fixed large non-decimal literals.

This closes #551 issue on Github.
diff --git a/src/njs_number.c b/src/njs_number.c
index 68d8255..5aa0919 100644
--- a/src/njs_number.c
+++ b/src/njs_number.c
@@ -61,11 +61,11 @@
 }
 
 
-uint64_t
+double
 njs_number_oct_parse(const u_char **start, const u_char *end)
 {
     u_char        c;
-    uint64_t      num;
+    double        num;
     const u_char  *p, *_;
 
     p = *start;
@@ -95,11 +95,11 @@
 }
 
 
-uint64_t
+double
 njs_number_bin_parse(const u_char **start, const u_char *end)
 {
     u_char        c;
-    uint64_t      num;
+    double        num;
     const u_char  *p, *_;
 
     p = *start;
@@ -129,11 +129,11 @@
 }
 
 
-uint64_t
+double
 njs_number_hex_parse(const u_char **start, const u_char *end,
     njs_bool_t literal)
 {
-    uint64_t      num;
+    double        num;
     njs_int_t     n;
     const u_char  *p, *_;
 
@@ -163,12 +163,11 @@
 }
 
 
-int64_t
+static double
 njs_number_radix_parse(const u_char **start, const u_char *end, uint8_t radix)
 {
     uint8_t       d;
-    int64_t       num;
-    uint64_t      n;
+    double        num, n;
     const u_char  *p;
 
     static const int8_t  digits[256]
@@ -192,7 +191,7 @@
         -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
     };
 
-    num = -1;
+    num = NAN;
     n = 0;
 
     for (p = *start; p < end; p++) {
@@ -1066,7 +1065,6 @@
     njs_index_t unused)
 {
     double        num;
-    int64_t       n;
     int32_t       radix;
     njs_int_t     ret;
     njs_str_t     string;
@@ -1142,12 +1140,9 @@
         radix = 16;
     }
 
-    n = njs_number_radix_parse(&p, end, radix);
+    num = njs_number_radix_parse(&p, end, radix);
 
-    if (n >= 0) {
-        num = n;
-        num = minus ? -num : num;
-    }
+    num = minus ? -num : num;
 
 done:
 
diff --git a/src/njs_number.h b/src/njs_number.h
index 9d97c8d..1844dc4 100644
--- a/src/njs_number.h
+++ b/src/njs_number.h
@@ -16,12 +16,10 @@
 double njs_key_to_index(const njs_value_t *value);
 double njs_number_dec_parse(const u_char **start, const u_char *end,
     njs_bool_t literal);
-uint64_t njs_number_oct_parse(const u_char **start, const u_char *end);
-uint64_t njs_number_bin_parse(const u_char **start, const u_char *end);
-uint64_t njs_number_hex_parse(const u_char **start, const u_char *end,
+double njs_number_oct_parse(const u_char **start, const u_char *end);
+double njs_number_bin_parse(const u_char **start, const u_char *end);
+double njs_number_hex_parse(const u_char **start, const u_char *end,
     njs_bool_t literal);
-int64_t njs_number_radix_parse(const u_char **start, const u_char *end,
-    uint8_t radix);
 njs_int_t njs_number_to_string(njs_vm_t *vm, njs_value_t *string,
     const njs_value_t *number);
 njs_int_t njs_number_to_chain(njs_vm_t *vm, njs_chb_t *chain,
diff --git a/src/test/njs_unit_test.c b/src/test/njs_unit_test.c
index 21587b6..e9bb424 100644
--- a/src/test/njs_unit_test.c
+++ b/src/test/njs_unit_test.c
@@ -338,6 +338,9 @@
     { njs_str("-0O7_7_7"),
       njs_str("-511") },
 
+    { njs_str("0o7777777777777777777777777777777777700000000000000000000000000000000"),
+      njs_str("3.2138760885179806e+60") },
+
     { njs_str("0o"),
       njs_str("SyntaxError: Unexpected token \"0o\" in 1") },
 
@@ -390,6 +393,9 @@
     { njs_str("-0B1111_1111"),
       njs_str("-255") },
 
+    { njs_str("0b111111111111111111111111111111111111111111111111111111111111111111111111111110000000000000"),
+      njs_str("1.2379400392853803e+27") },
+
     { njs_str("0b"),
       njs_str("SyntaxError: Unexpected token \"0b\" in 1") },
 
@@ -419,6 +425,12 @@
     { njs_str("0X00_00_BE_EF"),
       njs_str("48879") },
 
+    { njs_str("0x21bc2b266d3a3600000000000000000000000000000000000000000000000000000"),
+      njs_str("6.25e+79") },
+
+    { njs_str("0x21bc2b266d3a36000000000000000000000000000000000000000000000000000000"),
+      njs_str("1e+81") },
+
     { njs_str("0x"),
       njs_str("SyntaxError: Unexpected token \"0x\" in 1") },
 
@@ -16735,6 +16747,15 @@
     { njs_str("parseInt('1010', 2)"),
       njs_str("10") },
 
+    { njs_str("parseInt('111111111111111111111111111111111111111111111111111111111111111111111111111110000000000000', 2)"),
+      njs_str("1.2379400392853803e+27") },
+
+    { njs_str("parseInt('7777777777777777777777777777777777700000000000000000000000000000000', 8)"),
+      njs_str("3.2138760885179806e+60") },
+
+    { njs_str("parseInt('0x21bc2b266d3a3600000000000000000000000000000000000000000000000000000')"),
+      njs_str("6.25e+79") },
+
     { njs_str("parseInt('aBc', 16)"),
       njs_str("2748") },