From 7110f7a9ec67f999c68092cfce7072ff8134e991 Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Sat, 13 Apr 2019 22:18:13 +0200 Subject: various bugs in FP --- test/monniaux/math/exceptions.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/monniaux/math') diff --git a/test/monniaux/math/exceptions.c b/test/monniaux/math/exceptions.c index 05423e62..ad3047a0 100644 --- a/test/monniaux/math/exceptions.c +++ b/test/monniaux/math/exceptions.c @@ -73,4 +73,10 @@ int main() { unsigned v7 = double2uint(-0.25); // softfloat says "0 and inexact" but here we have "0 and overflow" (due to negative input for unsigned?) printf("%u %x\n", v7, fetestexcept(FE_ALL_EXCEPT)); feclearexcept(FE_ALL_EXCEPT); + + // +41F.307672C5496EF + double d8 = 0x1.307672C5496EFp32; + unsigned v8 = double2uint(d8); + printf("%g %x %x\n", d8, v8, fetestexcept(FE_ALL_EXCEPT)); // BUG reports 307672C5 and inexact, but should report overflow + feclearexcept(FE_ALL_EXCEPT); } -- cgit