Skip to content

Commit 3a168e7

Browse files
committed
simplify ABS (overlooked fabs call)
1 parent 3224ad2 commit 3a168e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/t-decimal.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ REBOOL almost_equal(REBDEC a, REBDEC b, REBCNT max_diff) {
324324
case A_EVENQ:
325325
case A_ODDQ:
326326
d1 = fabs(fmod(d1, 2.0));
327-
DECIDE((action == A_EVENQ) == (d1 < -1.5 || d1 > 1.5 || (d1 > -0.5 && d1 < 0.5)));
327+
DECIDE((action == A_EVENQ) == (d1 < 0.5 || d1 >= 1.5));
328328

329329
case A_MAKE:
330330
case A_TO:

0 commit comments

Comments
 (0)