diff options
Diffstat (limited to 'tests/tmul_si.c')
-rw-r--r-- | tests/tmul_si.c | 35 |
1 files changed, 3 insertions, 32 deletions
diff --git a/tests/tmul_si.c b/tests/tmul_si.c index 7b0662c..baa00c2 100644 --- a/tests/tmul_si.c +++ b/tests/tmul_si.c @@ -19,44 +19,15 @@ along with the MPC Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "mpfr.h" -#include "mpc.h" -#include "mpc-impl.h" - -static int -mpc_mul_si_ref (mpc_t, mpc_srcptr, long int, mpc_rnd_t); - -#include "random.c" -#define REFERENCE_FUNCTION mpc_mul_si_ref -#define TEST_FUNCTION mpc_mul_si -#include "tgeneric_ccs.c" - -static int -mpc_mul_si_ref (mpc_t z, mpc_srcptr x, long int y, mpc_rnd_t rnd) -/* computes the product of x and y using mpc_mul_fr using the rounding mode rnd */ -{ - mpfr_t yf; - int inexact_z; - - mpfr_init2 (yf, 8 * sizeof (long int)); - mpfr_set_si (yf, y, GMP_RNDN); - - inexact_z = mpc_mul_fr (z, x, yf, rnd); - - mpfr_clear (yf); - - return inexact_z; -} +#include "mpc-tests.h" int main (void) { + DECL_CCS_FUNC (f, mpc_mul_si); test_start (); - tgeneric (2, 1024, 7, -1); + tgeneric (f, 2, 1024, 7, -1); test_end (); |