Skip to content

Commit df78225

Browse files
committed
FIX: ROUND/EVEN/TO differences from Rebol2
fixes: metaeducation/rebol-issues#2323 DTOA was used in mode without limiting number of digits. Now it uses `system/options/decimal-digits` value for number of maximal displayed digits.
1 parent 88a9d14 commit df78225

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/f-math.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@
253253
if (decimal_digits < MIN_DIGITS) decimal_digits = MIN_DIGITS;
254254
else if (decimal_digits > MAX_DIGITS) decimal_digits = MAX_DIGITS;
255255

256-
sig = (REBYTE *) dtoa (d, 0, decimal_digits, &e, &sgn, (char **) &rve);
256+
sig = (REBYTE *) dtoa (d, 2, decimal_digits, &e, &sgn, (char **) &rve);
257257

258258
digits_obtained = rve - sig;
259259

0 commit comments

Comments
 (0)