summaryrefslogtreecommitdiff
path: root/tests/tpow_si.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2009-10-12 11:40:07 +0000
committerzimmerma <zimmerma@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2009-10-12 11:40:07 +0000
commit18112e2624870b4a8543927f6875301526a2948c (patch)
treecff20e05f92b092b186998252098933f09ee37da /tests/tpow_si.c
parent7775a916a6c517ed0c186cd2c31f7dcc1bcaeaba (diff)
downloadmpc-18112e2624870b4a8543927f6875301526a2948c.tar.gz
added test files for pow_ui, pow_fr, pow_si, pow_d, pow_ld
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@704 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'tests/tpow_si.c')
-rw-r--r--tests/tpow_si.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/tpow_si.c b/tests/tpow_si.c
new file mode 100644
index 0000000..08d8ff6
--- /dev/null
+++ b/tests/tpow_si.c
@@ -0,0 +1,44 @@
+/* test file for mpc_pow_si.
+
+Copyright (C) 2009 Paul Zimmermann
+
+This file is part of the MPC Library.
+
+The MPC Library 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 2.1 of the License, or (at your
+option) any later version.
+
+The MPC Library 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 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 "mpc-tests.h"
+
+int
+main (void)
+{
+ mpc_t z;
+
+ test_start ();
+
+ mpc_init2 (z, 5);
+ mpc_set_ui_ui (z, 3, 2, MPC_RNDNN);
+ mpc_pow_si (z, z, 3, MPC_RNDNN);
+ if (mpc_cmp_si_si (z, -9, 46) != 0)
+ {
+ printf ("Error for mpc_pow_si (1)\n");
+ exit (1);
+ }
+ mpc_clear (z);
+
+ test_end ();
+
+ return 0;
+}