diff options
author | enge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2010-06-16 12:23:37 +0000 |
---|---|---|
committer | enge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2010-06-16 12:23:37 +0000 |
commit | c40c996f085fa0a98fc680268167abf0a00d5792 (patch) | |
tree | 764d2193b506fb7b493c27d2eb25b22b87ee8e6a /doc | |
parent | 5d5818831a98453cacaaac537c3ca105995a17d4 (diff) | |
download | mpc-c40c996f085fa0a98fc680268167abf0a00d5792.tar.gz |
mpc.texi: added warning for mpc_set_fr_fr; closes bug #9991
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@781 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'doc')
-rw-r--r-- | doc/mpc.texi | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/mpc.texi b/doc/mpc.texi index 9071318..147093d 100644 --- a/doc/mpc.texi +++ b/doc/mpc.texi @@ -616,6 +616,12 @@ double-precision number, and then only to a complex number. @deftypefunx int mpc_set_fr_fr (mpc_t @var{rop}, mpfr_t @var{op1}, mpfr_t @var{op2}, mpc_rnd_t @var{rnd}) Set the real part of @var{rop} from @var{op1}, and its imaginary part from @var{op2}, according to the rounding mode @var{rnd}. + +Beware that the behaviour of @code{mpc_set_fr_fr} is undefined if @var{op1} +or @var{op2} is a pointer to the real or imaginary part of @var{rop}. +To exchange the real and the imaginary part of a complex number, either use +@code{mpfr_swap (mpc_realref (rop), mpc_imagref (rop))}, which also exchanges +the precisions of the two parts; or use a temporary variable. @end deftypefun For functions assigning complex variables from strings or input streams, |