summaryrefslogtreecommitdiff
path: root/sqrt.c
diff options
context:
space:
mode:
authorhanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4>1999-07-01 17:09:00 +0000
committerhanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4>1999-07-01 17:09:00 +0000
commitd0b3ee7cc19538a39fc5fb75aa0580c21f63bf4d (patch)
treee7cc45b136996688ec7fddc5491c0576cce1b0e7 /sqrt.c
parent74d13f9f62b928837364f87232ecce6106023e50 (diff)
downloadmpfr-d0b3ee7cc19538a39fc5fb75aa0580c21f63bf4d.tar.gz
Patch mpfr_set -> MPN_COPY
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@247 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'sqrt.c')
-rw-r--r--sqrt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sqrt.c b/sqrt.c
index d7338c9e8..611e99531 100644
--- a/sqrt.c
+++ b/sqrt.c
@@ -22,7 +22,7 @@ mpfr_sqrt(X, a, rnd_mode)
x = (mpfr_ptr) (*_mp_allocate_func) (sizeof(__mpfr_struct));
mpfr_init2(x, PREC(X));
- mpfr_set(x, X, rnd_mode);
+ MPN_COPY(x->_mp_d, X->_mp_d, (PREC(X)-1)/BITS_PER_MP_LIMB + 1);
e = EXP(a)/2; if (2*e<EXP(a)) e++;
/* now 2^(2*e-2) <= a < 2^(2*e) i.e. 1/4 <= a/2^(2e) < 1 */