Fix overflow on numeric comparison (#2849)

Although #2839 fixed the overflow of exponent subtraction,
there still is possibility of overflow in the `D2U` macro.
This patch fixes the overflow in the `D2U` macro, and also
truncates the maximum digits to `DEC_MAX_DIGITS`.
This commit is contained in:
itchyny authored and GitHub committed 2023-08-17 15:56:57 +09:00
1 parent 0733fd3d58
commit 7d64381016
2 files changed
+4 -2

No files matched your search

+1 -1
View File
@@ -569,7 +569,7 @@ true
true
# #2825
(1e999999999, 10e999999999) > (1e-1147483648, 0.1e-1147483648)
(1e999999999, 10e999999999) > (1e-1147483646, 0.1e-1147483646)
null
true
true