summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthevenyp <thevenyp@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2009-06-29 14:24:43 +0000
committerthevenyp <thevenyp@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2009-06-29 14:24:43 +0000
commitec8c536dd3bc32c173dd61c2159998b057a8382a (patch)
treef9e27ecf45a7acb42013b0bf80561d5dbc57ac73
parentd4c8fb2426aa8a2e5d8936bd0ed65248428a0e68 (diff)
downloadmpc-ec8c536dd3bc32c173dd61c2159998b057a8382a.tar.gz
src/random2.c src/mpc.h src/random.c src/Makefile.am doc/mpc.texi NEWS: remove obsolete mpc_random and mpc_random2.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@623 211d60ee-9f03-0410-a15a-8952a2c7a4e4
-rw-r--r--NEWS1
-rw-r--r--doc/mpc.texi21
-rw-r--r--src/Makefile.am16
-rw-r--r--src/mpc.h2
-rw-r--r--src/random.c38
-rw-r--r--src/random2.c29
6 files changed, 9 insertions, 98 deletions
diff --git a/NEWS b/NEWS
index 508273b..15f8080 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@ Recent Changes:
- Makefile.vc updated (thanks to Mickael Gastineau)
- Minimal gmp version is 4.2
- Changed MPC_SET_X_Y macro
+ - Functions mpc_random and mpc_random2 removed.
Changes in version 0.6:
- New functions: mpc_get_str, mpc_set_str, mpc_strtoc, mpc_set_uj,
diff --git a/doc/mpc.texi b/doc/mpc.texi
index 131b5f4..faea4af 100644
--- a/doc/mpc.texi
+++ b/doc/mpc.texi
@@ -988,27 +988,6 @@ structure which should be created using the GMP @code{rand_init} function, see
the GMP manual.
@end deftypefun
-@deftypefun void mpc_random (mpc_t @var{rop})
-Generate a random complex, with real and imaginary parts uniformly
-distributed in the interval -1 < X < 1.
-
-This function is deprecated and will be suppressed in the next release.
-@end deftypefun
-
-@deftypefun void mpc_random2 (mpc_t @var{rop}, mp_size_t @var{max_size}, mp_exp_t @var{max_exp})
-Generate a random complex, with real and imaginary part
-of at most @var{max_size} limbs, with long strings of
-zeros and ones in the binary representation. The exponent of the
-real (resp. imaginary) part is in
-the interval @minus{}@var{exp} to @var{exp}.
-This function is useful for
-testing functions and algorithms, since this kind of random numbers have
-proven to be more likely to trigger corner-case bugs.
-Negative parts are generated when @var{max_size} is negative.
-
-This function is deprecated and will be suppressed in the next release.
-@end deftypefun
-
@deftypefun {const char *} mpc_get_version (void)
Return the MPC version, as a null-terminated string.
@end deftypefun
diff --git a/src/Makefile.am b/src/Makefile.am
index b44b4f9..e36d26f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3,11 +3,11 @@ AM_CFLAGS=@WARNINGCFLAGS@
lib_LTLIBRARIES = libmpc.la
libmpc_la_LDFLAGS = -version-info 1:0:0
-libmpc_la_SOURCES = mpc-impl.h abs.c add.c add_fr.c add_ui.c arg.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 fr_div.c fr_sub.c get_prec2.c get_prec.c get_str.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 proj.c random2.c random.c \
-real.c urandom.c set.c set_prec.c set_str.c set_x.c set_x_x.c sin.c sinh.c \
-sqr.c sqrt.c strtoc.c sub.c sub_fr.c sub_ui.c tan.c tanh.c uceil_log2.c \
-ui_div.c ui_ui_sub.c
+libmpc_la_SOURCES = mpc-impl.h abs.c add.c add_fr.c add_ui.c arg.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 fr_div.c fr_sub.c get_prec2.c get_prec.c get_str.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 proj.c real.c \
+ urandom.c set.c set_prec.c set_str.c set_x.c set_x_x.c sin.c sinh.c sqr.c \
+ sqrt.c strtoc.c sub.c sub_fr.c sub_ui.c tan.c tanh.c uceil_log2.c ui_div.c \
+ ui_ui_sub.c
diff --git a/src/mpc.h b/src/mpc.h
index 82a4503..a1a8e7b 100644
--- a/src/mpc.h
+++ b/src/mpc.h
@@ -197,8 +197,6 @@ __MPC_DECLSPEC int mpc_sinh __MPC_PROTO ((mpc_ptr, mpc_srcptr, mpc_rnd_t));
__MPC_DECLSPEC int mpc_cosh __MPC_PROTO ((mpc_ptr, mpc_srcptr, mpc_rnd_t));
__MPC_DECLSPEC int mpc_tanh __MPC_PROTO ((mpc_ptr, mpc_srcptr, mpc_rnd_t));
__MPC_DECLSPEC void mpc_clear __MPC_PROTO ((mpc_ptr));
-__MPC_DECLSPEC void mpc_random __MPC_PROTO ((mpc_ptr));
-__MPC_DECLSPEC void mpc_random2 __MPC_PROTO ((mpc_ptr, mp_size_t, mp_exp_t));
__MPC_DECLSPEC int mpc_urandom __MPC_PROTO ((mpc_ptr, gmp_randstate_t));
__MPC_DECLSPEC void mpc_init2 __MPC_PROTO ((mpc_ptr, mp_prec_t));
__MPC_DECLSPEC void mpc_init3 __MPC_PROTO ((mpc_ptr, mp_prec_t, mp_prec_t));
diff --git a/src/random.c b/src/random.c
deleted file mode 100644
index 12b2137..0000000
--- a/src/random.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* mpc_random -- Generate a random complex number.
-
-Copyright (C) 2002, 2009 Andreas Enge, Paul Zimmermann, Philippe Th\'eveny
-
-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-impl.h"
-
-void
-mpc_random (mpc_ptr a)
-{
- mpfr_set_prec (MPC_RE (a), MPFR_PREC (MPC_RE (a)) + 1);
- mpfr_random (MPC_RE(a));
- mpfr_mul_2ui (MPC_RE (a), MPC_RE (a), 1, GMP_RNDN);
- mpfr_sub_ui (MPC_RE (a), MPC_RE (a), 1, GMP_RNDN);
- mpfr_round_prec (MPC_RE (a), GMP_RNDZ, MPFR_PREC (MPC_RE (a)) - 1);
-
- mpfr_set_prec (MPC_IM (a), MPFR_PREC (MPC_IM (a)) + 1);
- mpfr_random (MPC_IM(a));
- mpfr_mul_2ui (MPC_IM (a), MPC_IM (a), 1, GMP_RNDN);
- mpfr_sub_ui (MPC_IM (a), MPC_IM (a), 1, GMP_RNDN);
- mpfr_round_prec (MPC_IM (a), GMP_RNDZ, MPFR_PREC (MPC_IM (a)) - 1);
-}
diff --git a/src/random2.c b/src/random2.c
deleted file mode 100644
index d402b03..0000000
--- a/src/random2.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* mpc_random2 -- Generate a random complex number.
-
-Copyright (C) 2002, 2009 Andreas Enge, Paul Zimmermann, Philippe Th\'eveny
-
-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-impl.h"
-
-void
-mpc_random2 (mpc_ptr a, mp_size_t size, mp_exp_t exp)
-{
- mpfr_random2 (MPC_RE(a), size, exp);
- mpfr_random2 (MPC_IM(a), size, exp);
-}