diff options
author | thevenyp <thevenyp@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2008-10-31 17:10:40 +0000 |
---|---|---|
committer | thevenyp <thevenyp@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2008-10-31 17:10:40 +0000 |
commit | 58569080d8c48bd49b1695f547c7c02fe9796084 (patch) | |
tree | 7d17bbb7682b124b168732c0f1ab7eb00052167d /tests/read_data.c | |
parent | 33d1d210f37534ab949f9a4f9191d9b1963f4951 (diff) | |
download | mpc-58569080d8c48bd49b1695f547c7c02fe9796084.tar.gz |
mpc-tests.h: Add a new field for function properties to struct mpc_function; add field initialization to macro DECL_XX_FUNC; add a general macro DECL_FUNC replacing DECL_XX_FUNC macros that will be removed; add an identifier FUNC_PROP_SYMETRIC.
read_data.c: Use the symetry for CCC functions (halves data set).
tadd.c: Declare mpc_add as a symetric function.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@275 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'tests/read_data.c')
-rw-r--r-- | tests/read_data.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/read_data.c b/tests/read_data.c index fcee46d..ed55c33 100644 --- a/tests/read_data.c +++ b/tests/read_data.c @@ -524,6 +524,29 @@ data_check (mpc_function function, const char *file_name) exit (1); } + if (function.properties & FUNC_PROP_SYMETRIC) + { + function.pointer.CCC (z4, z3, z2, rnd); + if (!same_mpc_value (z4, z1, signs)) + { + /* display sensible variable names */ + mpc_t op1, op2, got, expected; + op1[0] = z3[0]; + op2[0] = z2[0]; + expected[0]= z1[0]; + got[0] = z4[0]; + printf ("%s(op) failed (line %lu/symetric test)\n" + "with rounding mode %s\n", + function.name, line_number, rnd_mode[rnd]); + OUT (op1); + OUT (op2); + printf (" "); + OUT (got); + OUT (expected); + + exit (1); + } + } break; case CFC: |