summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Enge <andreas.enge@inria.fr>2011-01-13 18:42:42 +0000
committerAndreas Enge <andreas.enge@inria.fr>2011-01-13 18:42:42 +0000
commitdda03c80b835fbd32a64b12f24ef6c6db8faa478 (patch)
tree995a92d5ac36a1da075342f981580a9fddb324f8
parent830da001941892cc157f075bbbed0bdb31226ee8 (diff)
downloadmpc-git-dda03c80b835fbd32a64b12f24ef6c6db8faa478.tar.gz
ui_ui_sub.c: reprogrammed function to reduce number of authors to contact
for copyright questions git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/mpc/trunk@868 211d60ee-9f03-0410-a15a-8952a2c7a4e4
-rw-r--r--AUTHORS2
-rw-r--r--src/ui_ui_sub.c19
2 files changed, 10 insertions, 11 deletions
diff --git a/AUTHORS b/AUTHORS
index 3864c4f..2179395 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -3,6 +3,4 @@ Main authors:
Philipe Théveny
Paul Zimmermann
-Patrick Pelissier has cleaned up some code.
-Marc Helbling has contributed the mpc_ui_ui_sub function and the mpc_ui_sub macro.
Mickaël Gastineau has contributed the file Makefile.vc.
diff --git a/src/ui_ui_sub.c b/src/ui_ui_sub.c
index e26a05a..8476c72 100644
--- a/src/ui_ui_sub.c
+++ b/src/ui_ui_sub.c
@@ -1,6 +1,7 @@
-/* mpc_ui_ui_sub -- Subtract a complex number from two unsigned long ints.
+/* mpc_ui_ui_sub -- Subtract a complex number from another one given
+implicitly by its real and imaginary parts of type unsigned long int.
-Copyright (C) 2005, 2009 Marc Helbling, Paul Zimmermann, Philippe Th\'eveny
+Copyright (C) 2011 Andreas Enge
This file is part of the MPC Library.
@@ -22,13 +23,13 @@ MA 02111-1307, USA. */
#include "mpc-impl.h"
int
-mpc_ui_ui_sub (mpc_ptr a, unsigned long int b, unsigned long int c,
- mpc_srcptr d, mpc_rnd_t rnd)
+mpc_ui_ui_sub (mpc_ptr rop, unsigned long int re, unsigned long int im,
+ mpc_srcptr op, mpc_rnd_t rnd)
{
- int inex_re, inex_im;
-
- inex_re = mpfr_ui_sub (MPC_RE (a), b, MPC_RE (d), MPC_RND_RE (rnd));
- inex_im = mpfr_ui_sub (MPC_IM (a), c, MPC_IM (d), MPC_RND_IM (rnd));
+ int inex_re, inex_im;
- return MPC_INEX (inex_re, inex_im);
+ inex_re = mpfr_ui_sub (MPC_RE (rop), re, MPC_RE (op), MPC_RND_RE (rnd));
+ inex_im = mpfr_ui_sub (MPC_IM (rop), im, MPC_IM (op), MPC_RND_IM (rnd));
+
+ return MPC_INEX (inex_re, inex_im);
}