summaryrefslogtreecommitdiff
path: root/tests/pow_fr.dat
diff options
context:
space:
mode:
authorzimmerma <zimmerma@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2011-09-07 17:31:05 +0000
committerzimmerma <zimmerma@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2011-09-07 17:31:05 +0000
commite30b69480b4585d565926fe5ae82ae4437a41686 (patch)
tree13c59fbb5b2afd6035519b1517789bd831b5658e /tests/pow_fr.dat
parent5c27a7fd1535195fc08912fd2fa12c7797f90893 (diff)
downloadmpc-e30b69480b4585d565926fe5ae82ae4437a41686.tar.gz
[src/pow.c] implement coherent algorithm for the sign of 0 in the output
in case the input x had +0 or -0 in its real or imaginary part, and y was real. Note: this might now give different signs of 0 than previously. [tests/pow_fr.dat] added corresponding test cases git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@1087 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'tests/pow_fr.dat')
-rw-r--r--tests/pow_fr.dat52
1 files changed, 52 insertions, 0 deletions
diff --git a/tests/pow_fr.dat b/tests/pow_fr.dat
index 59073e0..0816c13 100644
--- a/tests/pow_fr.dat
+++ b/tests/pow_fr.dat
@@ -20,3 +20,55 @@
# For explanations on the file format, see add_fr.dat.
0 0 5 -9 5 46 5 3 5 2 3 3 N N
+
+# (-0 -0.75)^4 = (0.31640625 -0) is rounded to (0.375 -0)
++ 0 2 0x3p-3 2 -0 2 -0 2 -0x3p-2 2 4 N N
+0 0 8 0x51p-8 2 -0 2 -0 2 -0x3p-2 2 4 N N
+# (+0 -0.75)^4 = (0.31640625 +0) is rounded to (0.375 +0)
++ 0 2 0x3p-3 2 +0 2 +0 2 -0x3p-2 2 4 N N
+0 0 8 0x51p-8 2 +0 2 +0 2 -0x3p-2 2 4 N N
+# (-0 0.75)^5 = (0.31640625 +0) is rounded to (0.375 +0)
++ 0 2 0x3p-3 2 +0 2 -0 2 0x3p-2 2 4 N N
+0 0 8 0x51p-8 2 +0 2 -0 2 0x3p-2 2 4 N N
+# (+0 0.75)^5 = (0.31640625 -0) is rounded to (0.375 -0)
++ 0 2 0x3p-3 2 -0 2 +0 2 0x3p-2 2 4 N N
+0 0 8 0x51p-8 2 -0 2 +0 2 0x3p-2 2 4 N N
+
+# (-0 -0.75)^5 = (-0 -0.2373046875) is rounded to (-0 -0.25)
+0 - 2 -0 2 -0x1p-2 2 -0 2 -0x3p-2 3 5 N N
+0 0 8 -0 8 -0xf3p-10 2 -0 2 -0x3p-2 3 5 N N
+# (+0 -0.75)^5 = (+0 -0.2373046875) is rounded to (+0 -0.25)
+0 - 2 +0 2 -0x1p-2 2 +0 2 -0x3p-2 3 5 N N
+0 0 8 +0 8 -0xf3p-10 2 +0 2 -0x3p-2 3 5 N N
+# (-0 0.75)^5 = (-0 0.2373046875) is rounded to (-0 0.25)
+0 + 2 -0 2 0x1p-2 2 -0 2 0x3p-2 3 5 N N
+0 0 8 -0 8 0xf3p-10 2 -0 2 0x3p-2 3 5 N N
+# (+0 0.75)^5 = (+0 0.2373046875) is rounded to (+0 0.25)
+0 + 2 +0 2 0x1p-2 2 +0 2 0x3p-2 3 5 N N
+0 0 8 +0 8 0xf3p-10 2 +0 2 0x3p-2 3 5 N N
+
+# (-0 -0.75)^6 = (-0.177978515625 +0) is rounded to (-0.1875 +0)
+- 0 2 -0x3p-4 2 +0 2 -0 2 -0x3p-2 3 6 N N
++ 0 8 -0x5bp-9 8 +0 2 -0 2 -0x3p-2 3 6 N N
+# (+0 -0.75)^6 = (-0.177978515625 -0) is rounded to (-0.1875 -0)
+- 0 2 -0x3p-4 2 -0 2 +0 2 -0x3p-2 3 6 N N
++ 0 8 -0x5bp-9 8 -0 2 +0 2 -0x3p-2 3 6 N N
+# (-0 0.75)^6 = (-0.177978515625 -0) is rounded to (-0.1875 -0)
+- 0 2 -0x3p-4 2 -0 2 -0 2 0x3p-2 3 6 N N
++ 0 8 -0x5bp-9 8 -0 2 -0 2 0x3p-2 3 6 N N
+# (+0 0.75)^6 = (-0.177978515625 +0) is rounded to (-0.1875 +0)
+- 0 2 -0x3p-4 2 +0 2 +0 2 0x3p-2 3 6 N N
++ 0 8 -0x5bp-9 8 +0 2 +0 2 0x3p-2 3 6 N N
+
+# (-0 -0.75)^7 = (+0 0.13348388671875) is rounded to (+0 0.125)
+0 - 2 +0 2 0x1p-3 2 -0 2 -0x3p-2 3 7 N N
+0 + 8 +0 8 0x89p-10 2 -0 2 -0x3p-2 3 7 N N
+# (+0 -0.75)^7 = (-0 0.13348388671875) is rounded to (-0 0.125)
+0 - 2 -0 2 0x1p-3 2 +0 2 -0x3p-2 3 7 N N
+0 + 8 -0 8 0x89p-10 2 +0 2 -0x3p-2 3 7 N N
+# (-0 0.75)^7 = (+0 -0.13348388671875) is rounded to (+0 -0.125)
+0 + 2 +0 2 -0x1p-3 2 -0 2 0x3p-2 3 7 N N
+0 - 8 +0 8 -0x89p-10 2 -0 2 0x3p-2 3 7 N N
+# (+0 0.75)^7 = (-0 -0.13348388671875) is rounded to (-0 -0.125)
+0 + 2 -0 2 -0x1p-3 2 +0 2 0x3p-2 3 7 N N
+0 - 8 -0 8 -0x89p-10 2 +0 2 0x3p-2 3 7 N N