Skip to content

Commit 8ea19d4

Browse files
committed
easier float test
1 parent b7bcc50 commit 8ea19d4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/test-floatingpoint.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ int main(void) {
2121
/* 15 + 1/2 + 1/8 = 15.625 */
2222
/* 15 + 1/2 + 1/8 + 1/32 = 15.65625 */
2323
/* 15 + 1/2 + 1/8 + 1/32 + 1/128 = 15.6640625 */
24-
if ((-*magic == 15.0 + 0.5 + 0.125 + 0.03125 + 0.0078125)) abort();
24+
if ((*magic >= 15.0 + 0.5 + 0.125 + 0.03125) &&
25+
(*magic <= 15.0 + 0.5 + 0.125 + 0.03125 + 0.0078125))
26+
abort();
2527

2628
}
2729

0 commit comments

Comments
 (0)