summaryrefslogtreecommitdiff
path: root/sqrt.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2002-04-05 12:04:40 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2002-04-05 12:04:40 +0000
commitc4812f86263f056c2676655df569d848c8b82930 (patch)
treee9527db14779ee712f4a0979370fca15c51661ac /sqrt.c
parent02f6f47e691aee1f72f41cfc91b60a006be038c5 (diff)
downloadmpfr-c4812f86263f056c2676655df569d848c8b82930.tar.gz
removed nested TMP_MARK's (problems when configuring gmp with --disable-alloca)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1816 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'sqrt.c')
-rw-r--r--sqrt.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/sqrt.c b/sqrt.c
index 419493fd5..7b97e7f90 100644
--- a/sqrt.c
+++ b/sqrt.c
@@ -40,9 +40,7 @@ mpfr_sqrt (mpfr_ptr r, mpfr_srcptr u, mp_rnd_t rnd_mode)
unsigned long cc = 0;
int can_round = 0;
- TMP_DECL(marker0);
- {
- TMP_DECL (marker);
+ TMP_DECL(marker);
if (MPFR_IS_NAN(u))
{
@@ -107,7 +105,7 @@ mpfr_sqrt (mpfr_ptr r, mpfr_srcptr u, mp_rnd_t rnd_mode)
to shift then.
*/
- TMP_MARK(marker0);
+ TMP_MARK(marker);
if (odd_exp_u) /* Shift u one bit to the right */
{
if (MPFR_PREC(u) & (BITS_PER_MP_LIMB - 1))
@@ -132,7 +130,6 @@ mpfr_sqrt (mpfr_ptr r, mpfr_srcptr u, mp_rnd_t rnd_mode)
do
{
- TMP_MARK (marker);
err = rsize * BITS_PER_MP_LIMB;
if (rsize < usize)
@@ -184,7 +181,6 @@ mpfr_sqrt (mpfr_ptr r, mpfr_srcptr u, mp_rnd_t rnd_mode)
#ifdef DEBUG
printf("Increasing the precision.\n");
#endif
- TMP_FREE(marker);
}
}
while (!can_round && (rsize < 2*usize) && (rsize += 2) && (rrsize++));
@@ -271,7 +267,6 @@ mpfr_sqrt (mpfr_ptr r, mpfr_srcptr u, mp_rnd_t rnd_mode)
MPFR_EXP(r)++;
}
- fin:
rsize = rrsize;
rrsize = (MPFR_PREC(r) - 1)/BITS_PER_MP_LIMB + 1;
MPN_COPY(MPFR_MANT(r), rp + rsize - rrsize, rrsize);
@@ -281,8 +276,6 @@ mpfr_sqrt (mpfr_ptr r, mpfr_srcptr u, mp_rnd_t rnd_mode)
(BITS_PER_MP_LIMB -
(MPFR_PREC(r) & (BITS_PER_MP_LIMB - 1)))) - 1);
- TMP_FREE (marker);
- }
- TMP_FREE(marker0);
+ TMP_FREE(marker);
return inexact;
}