summaryrefslogtreecommitdiff
path: root/mpf/set.c
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2004-03-03 20:55:27 +0100
committerKevin Ryde <user42@zip.com.au>2004-03-03 20:55:27 +0100
commitc88052b2f7d2b0091ccff03dc26a055ecdde71c1 (patch)
treeca14700f7d8e331341bf9fac20b77f024d64ee45 /mpf/set.c
parent6780696abcdd7b34a92d396817b45d76c2f28130 (diff)
downloadgmp-c88052b2f7d2b0091ccff03dc26a055ecdde71c1.tar.gz
* mpf/set.c: Use MPN_COPY_INCR, in case r==u and ABSIZ(u) > PREC(r)+1.
No actual bug here, because MPN_COPY has thusfar just been an alias for MPN_COPY_INCR, just an ASSERT failure. * mpf/set.c, mpf/iset.c: MPN_COPY last, for possible tail call.
Diffstat (limited to 'mpf/set.c')
-rw-r--r--mpf/set.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mpf/set.c b/mpf/set.c
index f4a87709b..f86d595b9 100644
--- a/mpf/set.c
+++ b/mpf/set.c
@@ -1,6 +1,6 @@
/* mpf_set -- Assign a float from another float.
-Copyright 1993, 1994, 1995, 2001 Free Software Foundation, Inc.
+Copyright 1993, 1994, 1995, 2001, 2004 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -41,7 +41,7 @@ mpf_set (mpf_ptr r, mpf_srcptr u)
asize = prec;
}
- MPN_COPY (rp, up, asize);
r->_mp_exp = u->_mp_exp;
r->_mp_size = size >= 0 ? asize : -asize;
+ MPN_COPY_INCR (rp, up, asize);
}