diff options
author | zimmerma <zimmerma@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2009-11-21 09:02:56 +0000 |
---|---|---|
committer | zimmerma <zimmerma@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2009-11-21 09:02:56 +0000 |
commit | 5e611241e6fc32d71fa2557f7e4dccd61568d547 (patch) | |
tree | 1f7b2c06782579ad5fe01e0acf1cad37c00f6df2 | |
parent | e50f474738de94f86c172f4e8fe56c4610bbcca2 (diff) | |
download | mpc-5e611241e6fc32d71fa2557f7e4dccd61568d547.tar.gz |
[abs.c,norm.c] changed mp_rnd_t to mpfr_rnd_t
[mpc.texi] changed mp_rnd_t to mpfr_rnd_t for abs and norm
changed mpc_rnd_t into mpfr_rnd_t for arg
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@726 211d60ee-9f03-0410-a15a-8952a2c7a4e4
-rw-r--r-- | doc/mpc.texi | 8 | ||||
-rw-r--r-- | src/abs.c | 5 | ||||
-rw-r--r-- | src/norm.c | 3 |
3 files changed, 9 insertions, 7 deletions
diff --git a/doc/mpc.texi b/doc/mpc.texi index 0d1b3c6..7c6dbc8 100644 --- a/doc/mpc.texi +++ b/doc/mpc.texi @@ -690,7 +690,7 @@ in base @var{base}; otherwise it returns @minus{}1, and @var{rop} is set to NaN+i*NaN. @end deftypefun -@deftypefun {char *} mpc_get_str (int @var{b}, size_t @var{n}, mpc_t @var{op}, mp_rnd_t @var{rnd}) +@deftypefun {char *} mpc_get_str (int @var{b}, size_t @var{n}, mpc_t @var{op}, mpc_rnd_t @var{rnd}) Convert @var{op} to a string containing its real and imaginary parts, separated by a space and enclosed in a pair of parentheses. The numbers are written in base @var{b} (which may vary from 2 to 36) and @@ -813,7 +813,7 @@ respectively. The @code{mpfr} functions can be used on the result of these macros (note that the @code{mpfr_t} type is itself a pointer). @end deftypefn -@deftypefn Function int mpc_arg (mpfr_t @var{rop}, mpc_t @var{op}, mpc_rnd_t @var{rnd}) +@deftypefn Function int mpc_arg (mpfr_t @var{rop}, mpc_t @var{op}, mpfr_rnd_t @var{rnd}) Set @var{rop} to the argument of @var{op}, with a branch cut along the negative real axis. @end deftypefn @@ -893,13 +893,13 @@ Just changes the sign of the imaginary part if @var{rop} and @var{op} are the same variable. @end deftypefun -@deftypefun int mpc_abs (mpfr_t @var{rop}, mpc_t @var{op}, mp_rnd_t @var{rnd}) +@deftypefun int mpc_abs (mpfr_t @var{rop}, mpc_t @var{op}, mpfr_rnd_t @var{rnd}) Set the floating-point number @var{rop} to the absolute value of @var{op}, rounded in the direction @var{rnd}. The returned value is zero iff the result is exact. @end deftypefun -@deftypefun int mpc_norm (mpfr_t @var{rop}, mpc_t @var{op}, mp_rnd_t @var{rnd}) +@deftypefun int mpc_norm (mpfr_t @var{rop}, mpc_t @var{op}, mpfr_rnd_t @var{rnd}) Set the floating-point number @var{rop} to the norm of @var{op} (i.e., the square of its absolute value), rounded in the direction @var{rnd}. @@ -1,6 +1,6 @@ /* mpc_abs -- Absolute value of a complex number. -Copyright (C) 2008, 2009 Andreas Enge, Philippe Th\'eveny +Copyright (C) 2008, 2009 Andreas Enge, Philippe Th\'eveny, Paul Zimmermann This file is part of the MPC Library. @@ -21,8 +21,9 @@ MA 02111-1307, USA. */ #include "mpc-impl.h" +/* the rounding mode is mpfr_rnd_t here since we return an mpfr number */ int -mpc_abs (mpfr_ptr a, mpc_srcptr b, mp_rnd_t rnd) +mpc_abs (mpfr_ptr a, mpc_srcptr b, mpfr_rnd_t rnd) { return mpfr_hypot (a, MPC_RE(b), MPC_IM(b), rnd); } @@ -21,8 +21,9 @@ MA 02111-1307, USA. */ #include "mpc-impl.h" +/* the rounding mode is mpfr_rnd_t here since we return an mpfr number */ int -mpc_norm (mpfr_ptr a, mpc_srcptr b, mp_rnd_t rnd) +mpc_norm (mpfr_ptr a, mpc_srcptr b, mpfr_rnd_t rnd) { mpfr_t u, v; mp_prec_t prec; |