From 8ea19d4266dab5c6c88336119be40529ed148c8f Mon Sep 17 00:00:00 2001 From: van Hauser Date: Fri, 31 Jul 2020 19:37:05 +0200 Subject: easier float test --- test/test-floatingpoint.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/test-floatingpoint.c') diff --git a/test/test-floatingpoint.c b/test/test-floatingpoint.c index 66d84411..febfae05 100644 --- a/test/test-floatingpoint.c +++ b/test/test-floatingpoint.c @@ -21,7 +21,9 @@ int main(void) { /* 15 + 1/2 + 1/8 = 15.625 */ /* 15 + 1/2 + 1/8 + 1/32 = 15.65625 */ /* 15 + 1/2 + 1/8 + 1/32 + 1/128 = 15.6640625 */ - if ((-*magic == 15.0 + 0.5 + 0.125 + 0.03125 + 0.0078125)) abort(); + if ((*magic >= 15.0 + 0.5 + 0.125 + 0.03125) && + (*magic <= 15.0 + 0.5 + 0.125 + 0.03125 + 0.0078125)) + abort(); } -- cgit 1.4.1