diff options
author | thevenyp <thevenyp@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2013-11-07 14:35:52 +0000 |
---|---|---|
committer | thevenyp <thevenyp@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2013-11-07 14:35:52 +0000 |
commit | c672fb64e4b5b6f4bacc44c80d1d2d33e105c78c (patch) | |
tree | 079b165e4cca131f1bbbebf5e04195f309832918 | |
parent | be01156bfd4e4f1517b4b7eaa177f54c7882e7ca (diff) | |
download | mpc-c672fb64e4b5b6f4bacc44c80d1d2d33e105c78c.tar.gz |
[tests/] Add templated test for mpc_exp.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/branches/benchs_tests@1331 211d60ee-9f03-0410-a15a-8952a2c7a4e4
-rw-r--r-- | tests/Makefile.am | 36 | ||||
-rw-r--r-- | tests/exp.dsc | 28 | ||||
-rw-r--r-- | tests/texp_tmpl.c | 44 |
3 files changed, 91 insertions, 17 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index a7a349c..4ff9d5a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -28,18 +28,19 @@ AM_LDFLAGS = -no-install LOADLIBES=$(DEFS) -I$(top_srcdir)/src -I$(top_builddir) $(CPPFLAGS) \ $(CFLAGS) -L$(top_builddir)/tests/.libs -lmpc-tests -lmpc -lm $(LIBS) -TEMPLATED = tabs_tmpl tacos_tmpl tacosh_tmpl tadd_tmpl tadd_fr_tmpl targ_tmpl \ - tasin_tmpl tasinh_tmpl tatan_tmpl tatanh_tmpl tconj_tmpl tcos_tmpl \ - tcosh_tmpl tdiv_tmpl tdiv_tmpl tfr_div_tmpl tfr_sub_tmpl tmul_tmpl \ - tmul_fr_tmpl tpow_tmpl tpow_fr_tmpl tpow_si_tmpl tpow_ui_tmpl tpow_z_tmpl \ - tsin_tmpl tsinh_tmpl tsub_tmpl ttan_tmpl ttanh_tmpl -check_PROGRAMS = tabs tacos tacosh tadd tadd_fr tadd_si tadd_ui targ tasin \ - tasinh tatan tatanh tconj tcos tcosh tdiv tdiv_2si tdiv_2ui tdiv_fr tdiv_ui \ - texp tfma tfr_div tfr_sub timag tio_str tlog tlog10 tmul tmul_2si tmul_2ui \ - tmul_fr tmul_i tmul_si tmul_ui tneg tnorm tpow tpow_ld tpow_d tpow_fr \ - tpow_si tpow_ui tpow_z tprec tproj treal treimref tset tsin tsin_cos tsinh \ - tsqr tsqrt tstrtoc tsub tsub_fr tsub_ui tswap ttan ttanh tui_div tui_ui_sub \ - tget_version $(TEMPLATED) +TEMPLATED = tabs_tmpl tacos_tmpl tacosh_tmpl tadd_tmpl tadd_fr_tmpl \ + targ_tmpl tasin_tmpl tasinh_tmpl tatan_tmpl tatanh_tmpl tconj_tmpl \ + tcos_tmpl tcosh_tmpl tdiv_tmpl tdiv_tmpl texp_tmpl tfr_div_tmpl \ + tfr_sub_tmpl tmul_tmpl tmul_fr_tmpl tpow_tmpl tpow_fr_tmpl \ + tpow_si_tmpl tpow_ui_tmpl tpow_z_tmpl tsin_tmpl tsinh_tmpl tsub_tmpl \ + ttan_tmpl ttanh_tmpl +check_PROGRAMS = tabs tacos tacosh tadd tadd_fr tadd_si tadd_ui targ \ + tasin tasinh tatan tatanh tconj tcos tcosh tdiv tdiv_2si tdiv_2ui \ + tdiv_fr tdiv_ui texp tfma tfr_div tfr_sub timag tio_str tlog tlog10 \ + tmul tmul_2si tmul_2ui tmul_fr tmul_i tmul_si tmul_ui tneg tnorm tpow \ + tpow_ld tpow_d tpow_fr tpow_si tpow_ui tpow_z tprec tproj treal \ + treimref tset tsin tsin_cos tsinh tsqr tsqrt tstrtoc tsub tsub_fr \ + tsub_ui tswap ttan ttanh tui_div tui_ui_sub tget_version $(TEMPLATED) check_LTLIBRARIES=libmpc-tests.la libmpc_tests_la_SOURCES=mpc-tests.h random.c tgeneric.c read_data.c \ @@ -48,11 +49,12 @@ libmpc_tests_la_SOURCES=mpc-tests.h random.c tgeneric.c read_data.c \ print_parameter.c read_description.c read_line.c tpl_gmp.c \ tpl_mpc.c tpl_mpfr.c tpl_native.c -TEMPLATES = data_check.tpl abs.dsc acos.dsc acosh.dsc asin.dsc asinh.dsc \ - atan.dsc atanh.dsc add.dsc add_fr.dsc add_si.dsc add_ui.dsc arg.dsc \ - conj.dsc cos.dsc cosh.dsc div.dsc div_fr.dsc fr_div.dsc fr_sub.dsc mul.dsc \ - mul_fr.dsc pow.dsc pow_fr.dsc pow_si.dsc pow_ui.dsc pow_z.dsc sin.dsc \ - sinh.dsc sub.dsc tan.dsc tanh.dsc +TEMPLATES = data_check.tpl abs.dsc acos.dsc acosh.dsc asin.dsc \ + asinh.dsc atan.dsc atanh.dsc add.dsc add_fr.dsc add_si.dsc add_ui.dsc \ + arg.dsc conj.dsc cos.dsc cosh.dsc div.dsc div_fr.dsc exp.dsc \ + fr_div.dsc fr_sub.dsc mul.dsc mul_fr.dsc pow.dsc pow_fr.dsc \ + pow_si.dsc pow_ui.dsc pow_z.dsc sin.dsc sinh.dsc sub.dsc tan.dsc \ + tanh.dsc DATA_SETS = abs.dat acos.dat acosh.dat asin.dat asinh.dat atan.dat \ atanh.dat add.dat add_fr.dat arg.dat conj.dat cos.dat cosh.dat \ div.dat div_fr.dat exp.dat fma.dat fr_div.dat fr_sub.dat \ diff --git a/tests/exp.dsc b/tests/exp.dsc new file mode 100644 index 0000000..83ba4b7 --- /dev/null +++ b/tests/exp.dsc @@ -0,0 +1,28 @@ +# Description file for mpc_exp +# +# Copyright (C) 2013 INRIA +# +# This file is part of GNU MPC. +# +# GNU MPC is free software; you can redistribute it and/or modify it under +# the terms of the GNU Lesser General Public License as published by the +# Free Software Foundation; either version 3 of the License, or (at your +#o ption) any later version. +# +# GNU MPC is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for +# more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program. If not, see http://www.gnu.org/licenses/ . +# +NAME: + mpc_exp +RETURN: + mpc_inex +OUTPUT: + mpc_ptr +INPUT: + mpc_srcptr + mpc_rnd_t diff --git a/tests/texp_tmpl.c b/tests/texp_tmpl.c new file mode 100644 index 0000000..fd8a30b --- /dev/null +++ b/tests/texp_tmpl.c @@ -0,0 +1,44 @@ +/* texp_tmpl -- templated test file for mpc_exp. + +Copyright (C) 2002, 2008, 2013 INRIA + +This file is part of GNU MPC. + +GNU MPC is free software; you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the +Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +GNU MPC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for +more details. + +You should have received a copy of the GNU Lesser General Public License +along with this program. If not, see http://www.gnu.org/licenses/ . +*/ + +#include "templates.h" +#include "mpc-tests.h" + +#define MPC_FUNCTION_CALL \ + P[0].mpc_inex = mpc_exp (P[1].mpc, P[2].mpc, P[3].mpc_rnd) +#define MPC_FUNCTION_CALL_REUSE_OP1 \ + P[0].mpc_inex = mpc_exp (P[1].mpc, P[1].mpc, P[3].mpc_rnd) + +#include "data_check.tpl" + +int +main (void) +{ + DECL_FUNC (CC, f, mpc_exp); + + test_start (); + + data_check_template ("exp.dsc", "exp.dat"); + tgeneric (f, 2, 512, 7, 256); + + test_end (); + + return 0; +} |