summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2012-07-05 08:55:42 +0000
committerenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2012-07-05 08:55:42 +0000
commiteb4484e39772db743d5ae49e0fe322ef3fcdb9db (patch)
tree55afe6dd4fc27feac975d138a5fa0e4b043795ec
parent4646f388cb3aa3d3435a08c7bdacab16e9530137 (diff)
downloadmpc-eb4484e39772db743d5ae49e0fe322ef3fcdb9db.tar.gz
renamed mul/div_2exp to mul/div_2ui
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@1224 211d60ee-9f03-0410-a15a-8952a2c7a4e4
-rw-r--r--NEWS4
-rw-r--r--doc/mpc.texi6
-rw-r--r--src/Makefile.am6
-rw-r--r--src/div_2ui.c (renamed from src/div_2exp.c)6
-rw-r--r--src/mpc.h4
-rw-r--r--src/mul_2ui.c (renamed from src/mul_2exp.c)6
-rw-r--r--tests/Makefile.am6
-rw-r--r--tests/tadd.c4
-rw-r--r--tests/tadd_fr.c4
-rw-r--r--tests/tadd_si.c4
-rw-r--r--tests/tadd_ui.c4
-rw-r--r--tests/tdiv_2ui.c (renamed from tests/tdiv_2exp.c)4
-rw-r--r--tests/tmul_2ui.c (renamed from tests/tmul_2exp.c)4
-rw-r--r--tests/tpow_fr.c4
14 files changed, 34 insertions, 32 deletions
diff --git a/NEWS b/NEWS
index b42b190..fbef739 100644
--- a/NEWS
+++ b/NEWS
@@ -1,8 +1,10 @@
Changes in version 1.0:
- First release as a GNU package
- License change: LGPLv3+ for code, GFDLv1.3+ for documentation
+ - Functions renamed:
+ mpc_mul_2exp to mpc_mul_2ui, mpc_div_2exp to mpc_div_2ui
- 0^0, which returned (NaN,NaN) previously, now returns (1,+0).
- - removed compatibility with K&R compilers, untestable due to lack of
+ - Removed compatibility with K&R compilers, untestable due to lack of
such compilers
- New function mpc_log10.
- Optimisation:
diff --git a/doc/mpc.texi b/doc/mpc.texi
index e38fedf..f43b297 100644
--- a/doc/mpc.texi
+++ b/doc/mpc.texi
@@ -13,7 +13,7 @@
This manual is for GNU MPC, a library for multiple precision complex arithmetic,
version @value{VERSION} of @value{UPDATED-MONTH}.
-Copyright @copyright{} 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 INRIA
+Copyright @copyright{} 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 INRIA
@quotation
Permission is granted to copy, distribute and/or modify this document
@@ -912,14 +912,14 @@ Set the floating-point number @var{rop} to the norm of @var{op}
rounded in the direction @var{rnd}.
@end deftypefun
-@deftypefun int mpc_mul_2exp (mpc_t @var{rop}, mpc_t @var{op1}, unsigned long int @var{op2}, mpc_rnd_t @var{rnd})
+@deftypefun int mpc_mul_2ui (mpc_t @var{rop}, mpc_t @var{op1}, unsigned long int @var{op2}, mpc_rnd_t @var{rnd})
Set @var{rop} to @var{op1} times 2 raised to @var{op2}
rounded according to @var{rnd}. Just increases the exponents
of the real and imaginary parts by @var{op2}
when @var{rop} and @var{op1} are identical.
@end deftypefun
-@deftypefun int mpc_div_2exp (mpc_t @var{rop}, mpc_t @var{op1}, unsigned long int @var{op2}, mpc_rnd_t @var{rnd})
+@deftypefun int mpc_div_2ui (mpc_t @var{rop}, mpc_t @var{op1}, unsigned long int @var{op2}, mpc_rnd_t @var{rnd})
Set @var{rop} to @var{op1} divided by 2 raised to @var{op2}
rounded according to @var{rnd}. Just decreases the exponents
of the real and imaginary parts by @var{op2}
diff --git a/src/Makefile.am b/src/Makefile.am
index 5cea5c2..03f7de7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,6 @@
## src/Makefile.am -- Process this file with automake to produce Makefile.in
##
-## Copyright (C) 2008, 2009, 2010, 2011 INRIA
+## Copyright (C) 2008, 2009, 2010, 2011, 2012 INRIA
##
## This file is part of GNU MPC.
##
@@ -21,9 +21,9 @@ lib_LTLIBRARIES = libmpc.la
libmpc_la_LDFLAGS = $(MPC_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 cos.c cosh.c div_2exp.c div.c div_fr.c div_ui.c exp.c \
+ cmp_si_si.c conj.c cos.c cosh.c div_2ui.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 log10.c mem.c mul_2exp.c mul.c \
+ imag.c init2.c init3.c inp_str.c log.c log10.c mem.c mul_2ui.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 \
diff --git a/src/div_2exp.c b/src/div_2ui.c
index 22e67e4..1319930 100644
--- a/src/div_2exp.c
+++ b/src/div_2ui.c
@@ -1,6 +1,6 @@
-/* mpc_div_2exp -- Divide a complex number by 2^e.
+/* mpc_div_2ui -- Divide a complex number by 2^e.
-Copyright (C) 2002, 2009, 2011 INRIA
+Copyright (C) 2002, 2009, 2011, 2012 INRIA
This file is part of GNU MPC.
@@ -21,7 +21,7 @@ along with this program. If not, see http://www.gnu.org/licenses/ .
#include "mpc-impl.h"
int
-mpc_div_2exp (mpc_ptr a, mpc_srcptr b, unsigned long int c, mpc_rnd_t rnd)
+mpc_div_2ui (mpc_ptr a, mpc_srcptr b, unsigned long int c, mpc_rnd_t rnd)
{
int inex_re, inex_im;
diff --git a/src/mpc.h b/src/mpc.h
index ddce41e..3f2b56e 100644
--- a/src/mpc.h
+++ b/src/mpc.h
@@ -151,8 +151,8 @@ __MPC_DECLSPEC int mpc_div_fr (mpc_ptr, mpc_srcptr, mpfr_srcptr, mpc_rnd_t);
__MPC_DECLSPEC int mpc_fr_div (mpc_ptr, mpfr_srcptr, mpc_srcptr, mpc_rnd_t);
__MPC_DECLSPEC int mpc_div_ui (mpc_ptr, mpc_srcptr, unsigned long int, mpc_rnd_t);
__MPC_DECLSPEC int mpc_ui_div (mpc_ptr, unsigned long int, mpc_srcptr, mpc_rnd_t);
-__MPC_DECLSPEC int mpc_div_2exp (mpc_ptr, mpc_srcptr, unsigned long int, mpc_rnd_t);
-__MPC_DECLSPEC int mpc_mul_2exp (mpc_ptr, mpc_srcptr, unsigned long int, mpc_rnd_t);
+__MPC_DECLSPEC int mpc_div_2ui (mpc_ptr, mpc_srcptr, unsigned long int, mpc_rnd_t);
+__MPC_DECLSPEC int mpc_mul_2ui (mpc_ptr, mpc_srcptr, unsigned long int, mpc_rnd_t);
__MPC_DECLSPEC int mpc_conj (mpc_ptr, mpc_srcptr, mpc_rnd_t);
__MPC_DECLSPEC int mpc_neg (mpc_ptr, mpc_srcptr, mpc_rnd_t);
__MPC_DECLSPEC int mpc_norm (mpfr_ptr, mpc_srcptr, mpfr_rnd_t);
diff --git a/src/mul_2exp.c b/src/mul_2ui.c
index ff2efe2..7a6f1ec 100644
--- a/src/mul_2exp.c
+++ b/src/mul_2ui.c
@@ -1,6 +1,6 @@
-/* mpc_mul_2exp -- Multiply a complex number by 2^e.
+/* mpc_mul_2ui -- Multiply a complex number by 2^e.
-Copyright (C) 2002, 2009, 2011 INRIA
+Copyright (C) 2002, 2009, 2011, 2012 INRIA
This file is part of GNU MPC.
@@ -21,7 +21,7 @@ along with this program. If not, see http://www.gnu.org/licenses/ .
#include "mpc-impl.h"
int
-mpc_mul_2exp (mpc_ptr a, mpc_srcptr b, unsigned long int c, mpc_rnd_t rnd)
+mpc_mul_2ui (mpc_ptr a, mpc_srcptr b, unsigned long int c, mpc_rnd_t rnd)
{
int inex_re, inex_im;
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 94976b8..72ea589 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,6 +1,6 @@
## tests/Makefile.am -- Process this file with automake to produce Makefile.in
##
-## Copyright (C) 2008, 2009, 2010, 2011 INRIA
+## Copyright (C) 2008, 2009, 2010, 2011, 2012 INRIA
##
## This file is part of GNU MPC.
##
@@ -28,8 +28,8 @@ AM_LDFLAGS = -no-install
LOADLIBES=$(DEFS) -I$(top_srcdir)/src -I$(top_builddir) $(CPPFLAGS) $(CFLAGS) -L$(top_builddir)/tests/.libs -lmpc-tests -lmpc -lm $(LIBS)
check_PROGRAMS = tabs tacos tacosh tadd tadd_fr tadd_si tadd_ui targ tasin \
-tasinh tatan tatanh tconj tcos tcosh tdiv tdiv_2exp tdiv_fr tdiv_ui texp tfma \
-tfr_div tfr_sub timag tio_str tlog tlog10 tmul tmul_2exp tmul_fr tmul_i \
+tasinh tatan tatanh tconj tcos tcosh tdiv tdiv_2ui tdiv_fr tdiv_ui texp tfma \
+tfr_div tfr_sub timag tio_str tlog tlog10 tmul tmul_2ui tmul_fr tmul_i \
tmul_si tmul_ui tneg tnorm tpow tpow_ld tpow_d tpow_fr tpow_si tpow_ui tpow_z \
tprec tproj treal treimref tset tsin tsin_cos tsinh tsqr tsqrt tstrtoc tsub \
tsub_fr tsub_ui tswap ttan ttanh tui_div tui_ui_sub tget_version
diff --git a/tests/tadd.c b/tests/tadd.c
index 1253b64..11a305b 100644
--- a/tests/tadd.c
+++ b/tests/tadd.c
@@ -1,6 +1,6 @@
/* tadd -- test file for mpc_add.
-Copyright (C) 2008, 2010, 2011 INRIA
+Copyright (C) 2008, 2010, 2011, 2012 INRIA
This file is part of GNU MPC.
@@ -37,7 +37,7 @@ check_ternary_value (void)
mpc_set_prec (y, prec);
mpc_set_ui (x, 1, MPC_RNDNN);
- mpc_mul_2exp (x, x, (unsigned long int) prec, MPC_RNDNN);
+ mpc_mul_2ui (x, x, (unsigned long int) prec, MPC_RNDNN);
mpc_set_ui (y, 1, MPC_RNDNN);
if (mpc_add (z, x, y, MPC_RNDNN) == 0)
diff --git a/tests/tadd_fr.c b/tests/tadd_fr.c
index d5ed163..1f3b76a 100644
--- a/tests/tadd_fr.c
+++ b/tests/tadd_fr.c
@@ -1,6 +1,6 @@
/* tadd_fr -- test file for mpc_add_fr.
-Copyright (C) 2008, 2010 INRIA
+Copyright (C) 2008, 2010, 2012 INRIA
This file is part of GNU MPC.
@@ -45,7 +45,7 @@ check_ternary_value (mpfr_prec_t prec_max, mpfr_prec_t step)
}
mpc_set_ui (z, 1, MPC_RNDNN);
- mpc_mul_2exp (z, z, (unsigned long int) prec, MPC_RNDNN);
+ mpc_mul_2ui (z, z, (unsigned long int) prec, MPC_RNDNN);
if (mpc_add_fr (z, z, f, MPC_RNDNN) == 0)
{
fprintf (stderr, "Error in mpc_add_fr: 2^prec+1 cannot be exact\n");
diff --git a/tests/tadd_si.c b/tests/tadd_si.c
index 20fb39d..da12a7a 100644
--- a/tests/tadd_si.c
+++ b/tests/tadd_si.c
@@ -1,6 +1,6 @@
/* tadd_si -- test file for mpc_add_si.
-Copyright (C) 2011 INRIA
+Copyright (C) 2011, 2012 INRIA
This file is part of GNU MPC.
@@ -42,7 +42,7 @@ check_ternary_value (void)
exit (1);
}
- mpc_mul_2exp (z, z, (unsigned long int) prec, MPC_RNDNN);
+ mpc_mul_2ui (z, z, (unsigned long int) prec, MPC_RNDNN);
if (mpc_add_si (z, z, s, MPC_RNDNN) == 0) {
printf ("Error in mpc_add_si: 2^(prec+1)-1 cannot be exact\n");
exit (1);
diff --git a/tests/tadd_ui.c b/tests/tadd_ui.c
index 362ebde..4f8efea 100644
--- a/tests/tadd_ui.c
+++ b/tests/tadd_ui.c
@@ -1,6 +1,6 @@
/* tadd_ui -- test file for mpc_add_ui.
-Copyright (C) 2008, 2010 INRIA
+Copyright (C) 2008, 2010, 2012 INRIA
This file is part of GNU MPC.
@@ -41,7 +41,7 @@ check_ternary_value (void)
}
mpc_set_ui (z, 1, MPC_RNDNN);
- mpc_mul_2exp (z, z, (unsigned long int) prec, MPC_RNDNN);
+ mpc_mul_2ui (z, z, (unsigned long int) prec, MPC_RNDNN);
if (mpc_add_ui (z, z, 1, MPC_RNDNN) == 0)
{
printf ("Error in mpc_add_ui: 2^prec+1 cannot be exact\n");
diff --git a/tests/tdiv_2exp.c b/tests/tdiv_2ui.c
index 91b03af..3a36ebd 100644
--- a/tests/tdiv_2exp.c
+++ b/tests/tdiv_2ui.c
@@ -1,6 +1,6 @@
/* tdiv_2exp -- test file for mpc_div_2exp.
-Copyright (C) 2008 INRIA
+Copyright (C) 2008, 2012 INRIA
This file is part of GNU MPC.
@@ -23,7 +23,7 @@ along with this program. If not, see http://www.gnu.org/licenses/ .
int
main (void)
{
- DECL_FUNC (CCU, f, mpc_div_2exp);
+ DECL_FUNC (CCU, f, mpc_div_2ui);
test_start ();
diff --git a/tests/tmul_2exp.c b/tests/tmul_2ui.c
index 0653899..7f6ec48 100644
--- a/tests/tmul_2exp.c
+++ b/tests/tmul_2ui.c
@@ -1,6 +1,6 @@
/* tmul_2exp -- test file for mpc_mul_2exp.
-Copyright (C) 2008 INRIA
+Copyright (C) 2008, 2012 INRIA
This file is part of GNU MPC.
@@ -23,7 +23,7 @@ along with this program. If not, see http://www.gnu.org/licenses/ .
int
main (void)
{
- DECL_FUNC (CCU, f, mpc_mul_2exp);
+ DECL_FUNC (CCU, f, mpc_mul_2ui);
test_start ();
diff --git a/tests/tpow_fr.c b/tests/tpow_fr.c
index 2b0dc29..47ef071 100644
--- a/tests/tpow_fr.c
+++ b/tests/tpow_fr.c
@@ -1,6 +1,6 @@
/* tpow_fr -- test file for mpc_pow_fr.
-Copyright (C) 2009, 2011 INRIA
+Copyright (C) 2009, 2011, 2012 INRIA
This file is part of GNU MPC.
@@ -31,7 +31,7 @@ test_reuse (void)
mpc_init2 (z, 2);
mpc_set_si_si (z, 0, -1, MPC_RNDNN);
mpfr_neg (mpc_realref (z), mpc_realref (z), GMP_RNDN);
- mpc_div_2exp (z, z, 4, MPC_RNDNN);
+ mpc_div_2ui (z, z, 4, MPC_RNDNN);
mpfr_set_ui (y, 512, GMP_RNDN);
inex = mpc_pow_fr (z, z, y, MPC_RNDNN);
if (MPC_INEX_RE(inex) != 0 || MPC_INEX_IM(inex) != 0 ||