aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/math
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-04-13 22:18:13 +0200
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-04-13 22:18:13 +0200
commit7110f7a9ec67f999c68092cfce7072ff8134e991 (patch)
treee2932dbc021c75cc17e8aaa7af693f4e30c2e048 /test/monniaux/math
parentdc4d89e2b91012334855bbbf184df32aa5d6d982 (diff)
downloadcompcert-kvx-7110f7a9ec67f999c68092cfce7072ff8134e991.tar.gz
compcert-kvx-7110f7a9ec67f999c68092cfce7072ff8134e991.zip
various bugs in FP
Diffstat (limited to 'test/monniaux/math')
-rw-r--r--test/monniaux/math/exceptions.c6
1 files changed, 6 insertions, 0 deletions
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);
}