summaryrefslogtreecommitdiff
path: root/mpc/src/set_x_x.c
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2015-04-27 11:45:02 +0100
committerJavier Jardón <jjardon@gnome.org>2015-04-27 11:46:11 +0100
commitcca9d546d497fac90f862e52c61177ba1daa9a84 (patch)
tree1a0573ed85a772d9bf8fd70608523731dee8ed6d /mpc/src/set_x_x.c
parent467cabff3ed4f2c36b3d79c488f50a67e715d63a (diff)
downloadgcc-tarball-cca9d546d497fac90f862e52c61177ba1daa9a84.tar.gz
Add mpc 1.0.3 tarballbaserock/5.1.0/gmp_mpfr_mpc
Diffstat (limited to 'mpc/src/set_x_x.c')
-rw-r--r--mpc/src/set_x_x.c78
1 files changed, 78 insertions, 0 deletions
diff --git a/mpc/src/set_x_x.c b/mpc/src/set_x_x.c
new file mode 100644
index 0000000000..3ce69f2454
--- /dev/null
+++ b/mpc/src/set_x_x.c
@@ -0,0 +1,78 @@
+/* mpc_set_x_x -- Set complex number real and imaginary parts from parameters
+ whose type is known by mpfr.
+
+Copyright (C) 2009, 2011 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 "config.h"
+
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h> /* for intmax_t */
+#else
+# ifdef HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+
+#include "mpc-impl.h"
+
+#define MPC_SET_X_X(type, z, real_value, imag_value, rnd) \
+ MPC_SET_X_Y (type, type, z, real_value, imag_value, rnd)
+
+int
+mpc_set_d_d (mpc_ptr z, double a, double b, mpc_rnd_t rnd)
+ MPC_SET_X_X (d, z, a, b, rnd)
+
+int
+mpc_set_f_f (mpc_ptr z, mpf_srcptr a, mpf_srcptr b, mpc_rnd_t rnd)
+ MPC_SET_X_X (f, z, a, b, rnd)
+
+int
+mpc_set_fr_fr (mpc_ptr z, mpfr_srcptr a, mpfr_srcptr b, mpc_rnd_t rnd)
+ MPC_SET_X_X (fr, z, a, b, rnd)
+
+int
+mpc_set_ld_ld (mpc_ptr z, long double a, long double b, mpc_rnd_t rnd)
+ MPC_SET_X_X (ld, z, a, b, rnd)
+
+int
+mpc_set_q_q (mpc_ptr z, mpq_srcptr a, mpq_srcptr b, mpc_rnd_t rnd)
+ MPC_SET_X_X (q, z, a, b, rnd)
+
+int
+mpc_set_si_si (mpc_ptr z, long int a, long int b, mpc_rnd_t rnd)
+ MPC_SET_X_X (si, z, a, b, rnd)
+
+int
+mpc_set_ui_ui (mpc_ptr z, unsigned long int a, unsigned long int b,
+ mpc_rnd_t rnd)
+ MPC_SET_X_X (ui, z, a, b, rnd)
+
+int
+mpc_set_z_z (mpc_ptr z, mpz_srcptr a, mpz_srcptr b, mpc_rnd_t rnd)
+ MPC_SET_X_X (z, z, a, b, rnd)
+
+#ifdef _MPC_H_HAVE_INTMAX_T
+int
+mpc_set_uj_uj (mpc_ptr z, uintmax_t a, uintmax_t b, mpc_rnd_t rnd)
+ MPC_SET_X_X (uj, z, a, b, rnd)
+
+int
+mpc_set_sj_sj (mpc_ptr z, intmax_t a, intmax_t b, mpc_rnd_t rnd)
+ MPC_SET_X_X (sj, z, a, b, rnd)
+#endif