summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO4
-rw-r--r--src/Makefile.am18
-rw-r--r--src/cos.c27
-rw-r--r--src/get_x.c (renamed from src/get.c)0
-rw-r--r--src/sin.c27
-rw-r--r--src/sin_cos.c16
6 files changed, 68 insertions, 24 deletions
diff --git a/TODO b/TODO
index b5c0a74..e0d0137 100644
--- a/TODO
+++ b/TODO
@@ -1,3 +1,7 @@
+From Andreas Enge 30 August 2011:
+As soon as dependent on mpfr>=3, remove auxiliary functions from
+get_version.c and update mpc.h.
+
From Andreas Enge 23 February 2011:
rewrite sqr following the structure of mul to make sure that intermediate
over- and underflows are handled correctly
diff --git a/src/Makefile.am b/src/Makefile.am
index 42369f6..1e99ca9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -20,14 +20,14 @@
lib_LTLIBRARIES = libmpc.la
libmpc_la_LDFLAGS = -version-info 2:0:0
libmpc_la_SOURCES = mpc-impl.h abs.c acos.c acosh.c add.c add_fr.c \
- add_si.c add_ui.c arg.c asin.c asinh.c atan.c atanh.c clear.c cmp.c cmp_si_si.c \
- conj.c cosh.c div_2exp.c div.c div_fr.c div_ui.c exp.c fma.c fr_div.c \
- fr_sub.c get.c get_prec2.c get_prec.c get_version.c imag.c \
- init2.c init3.c inp_str.c log.c mem.c mul_2exp.c mul.c mul_fr.c mul_i.c \
- mul_si.c mul_ui.c neg.c norm.c out_str.c pow.c pow_fr.c pow_ld.c pow_d.c \
- pow_si.c pow_ui.c pow_z.c proj.c real.c urandom.c set.c set_prec.c \
- set_str.c set_x.c set_x_x.c sin_cos.c sinh.c sqr.c sqrt.c strtoc.c \
- sub.c sub_fr.c sub_ui.c swap.c tan.c tanh.c uceil_log2.c ui_div.c \
- ui_ui_sub.c
+ add_si.c add_ui.c arg.c asin.c asinh.c atan.c atanh.c clear.c cmp.c \
+ cmp_si_si.c conj.c cos.c cosh.c div_2exp.c div.c div_fr.c div_ui.c exp.c \
+ fma.c fr_div.c fr_sub.c get_prec2.c get_prec.c get_version.c get_x.c \
+ imag.c init2.c init3.c inp_str.c log.c mem.c mul_2exp.c mul.c \
+ mul_fr.c mul_i.c mul_si.c mul_ui.c neg.c norm.c out_str.c pow.c pow_fr.c \
+ pow_ld.c pow_d.c pow_si.c pow_ui.c pow_z.c proj.c real.c urandom.c set.c \
+ set_prec.c set_str.c set_x.c set_x_x.c sin.c sin_cos.c sinh.c sqr.c \
+ sqrt.c strtoc.c sub.c sub_fr.c sub_ui.c swap.c tan.c tanh.c uceil_log2.c \
+ ui_div.c ui_ui_sub.c
libmpc_la_LIBADD = @LTLIBOBJS@
diff --git a/src/cos.c b/src/cos.c
new file mode 100644
index 0000000..3810f3e
--- /dev/null
+++ b/src/cos.c
@@ -0,0 +1,27 @@
+/* mpc_cos -- cosine of a complex number.
+
+Copyright (C) 2010, 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 "mpc-impl.h"
+
+int
+mpc_cos (mpc_ptr rop, mpc_srcptr op, mpc_rnd_t rnd)
+{
+ return MPC_INEX2 (mpc_sin_cos (NULL, rop, op, 0, rnd));
+}
diff --git a/src/get.c b/src/get_x.c
index 972376d..972376d 100644
--- a/src/get.c
+++ b/src/get_x.c
diff --git a/src/sin.c b/src/sin.c
new file mode 100644
index 0000000..27df761
--- /dev/null
+++ b/src/sin.c
@@ -0,0 +1,27 @@
+/* mpc_sin -- sine of a complex number.
+
+Copyright (C) 2010, 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 "mpc-impl.h"
+
+int
+mpc_sin (mpc_ptr rop, mpc_srcptr op, mpc_rnd_t rnd)
+{
+ return MPC_INEX1 (mpc_sin_cos (rop, NULL, op, rnd, 0));
+}
diff --git a/src/sin_cos.c b/src/sin_cos.c
index 4525996..99a0772 100644
--- a/src/sin_cos.c
+++ b/src/sin_cos.c
@@ -1,4 +1,4 @@
-/* mpc_sin_cos, mpc_sin, mpc_cos -- sine and cosine of a complex number.
+/* mpc_sin_cos -- combined sine and cosine of a complex number.
Copyright (C) 2010, 2011 INRIA
@@ -400,17 +400,3 @@ mpc_sin_cos (mpc_ptr rop_sin, mpc_ptr rop_cos, mpc_srcptr op,
return (MPC_INEX12 (inex_sin, inex_cos));
}
}
-
-
-int
-mpc_sin (mpc_ptr rop, mpc_srcptr op, mpc_rnd_t rnd)
-{
- return MPC_INEX1 (mpc_sin_cos (rop, NULL, op, rnd, 0));
-}
-
-
-int
-mpc_cos (mpc_ptr rop, mpc_srcptr op, mpc_rnd_t rnd)
-{
- return MPC_INEX2 (mpc_sin_cos (NULL, rop, op, 0, rnd));
-}