summaryrefslogtreecommitdiff
path: root/sqr.c
diff options
context:
space:
mode:
authorpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2005-05-18 15:57:10 +0000
committerpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2005-05-18 15:57:10 +0000
commitb88c50d268e5e11da7c3363d421246dbb14bc180 (patch)
tree205a24fbfc48e8d135ec15b617d85335a673ad58 /sqr.c
parente1bd5aef35c4619b29cf017d8128525d23bbdb56 (diff)
downloadmpfr-b88c50d268e5e11da7c3363d421246dbb14bc180.tar.gz
Replace TMP_ALLOC by MPFR_TMP_ALLOC
Replace TMP_DECL by MPFR_TMP_DECL Replace TMP_MARK by MPFR_TMP_MARK Replace TMP_FREE by MPFR_TMP_FREE Add support for GMP's TMP_SALLOC. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3593 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'sqr.c')
-rw-r--r--sqr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sqr.c b/sqr.c
index df1e0e1b0..63ecda961 100644
--- a/sqr.c
+++ b/sqr.c
@@ -33,7 +33,7 @@ mpfr_sqr (mpfr_ptr a, mpfr_srcptr b, mp_rnd_t rnd_mode)
mp_limb_t b1;
mp_prec_t bq;
mp_size_t bn, tn;
- TMP_DECL(marker);
+ MPFR_TMP_DECL(marker);
/* deal with special cases */
if (MPFR_UNLIKELY(MPFR_IS_SINGULAR(b)))
@@ -59,8 +59,8 @@ mpfr_sqr (mpfr_ptr a, mpfr_srcptr b, mp_rnd_t rnd_mode)
bn = (bq+BITS_PER_MP_LIMB-1)/BITS_PER_MP_LIMB; /* number of limbs of b */
tn = (2*bq + BITS_PER_MP_LIMB - 1) / BITS_PER_MP_LIMB;
- TMP_MARK(marker);
- tmp = (mp_limb_t *) TMP_ALLOC((size_t) 2*bn * BYTES_PER_MP_LIMB);
+ MPFR_TMP_MARK(marker);
+ tmp = (mp_limb_t *) MPFR_TMP_ALLOC((size_t) 2*bn * BYTES_PER_MP_LIMB);
/* Multiplies the mantissa in temporary allocated space */
mpn_sqr_n (tmp, MPFR_MANT(b), bn);
@@ -83,7 +83,7 @@ mpfr_sqr (mpfr_ptr a, mpfr_srcptr b, mp_rnd_t rnd_mode)
if (MPFR_UNLIKELY(cc))
MPFR_MANT(a)[MPFR_LIMB_SIZE(a)-1] = MPFR_LIMB_HIGHBIT;
- TMP_FREE(marker);
+ MPFR_TMP_FREE(marker);
{
mp_exp_t ax2 = ax + (mp_exp_t) (b1 - 1 + cc);
if (MPFR_UNLIKELY( ax2 > __gmpfr_emax))