summaryrefslogtreecommitdiff
path: root/src/mpfr-gmp.h
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2011-08-12 11:18:12 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2011-08-12 11:18:12 +0000
commit17c720605893463353b93ef1fcf8a566b91c6d1f (patch)
tree9750ff8e53e87863a790fe41628434d49b6a6dd9 /src/mpfr-gmp.h
parentd2fa340f7f1eb1c373d654a9c223d8919a594a4a (diff)
downloadmpfr-17c720605893463353b93ef1fcf8a566b91c6d1f.tar.gz
[src/mpfr-gmp.h] Untabified.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7792 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/mpfr-gmp.h')
-rw-r--r--src/mpfr-gmp.h102
1 files changed, 51 insertions, 51 deletions
diff --git a/src/mpfr-gmp.h b/src/mpfr-gmp.h
index 1bec5421e..b94bf6421 100644
--- a/src/mpfr-gmp.h
+++ b/src/mpfr-gmp.h
@@ -332,31 +332,31 @@ typedef struct {mp_limb_t inv32;} mpfr_pi1_t; /* We changed gmp_pi1_t into
It returns dinv = floor((B^3-1)/(d1*B+d0))-B, where B=2^BITS_PER_LIMB,
assuming the most significant bit of d1 is set. */
#undef invert_pi1
-#define invert_pi1(dinv, d1, d0) \
- do { \
- mp_limb_t v, p, t1, t0, mask; \
- invert_limb (v, d1); \
- p = d1 * v; \
- p += d0; \
- if (p < d0) \
- { \
- v--; \
- mask = -(p >= d1); \
- p -= d1; \
- v += mask; \
- p -= mask & d1; \
- } \
- umul_ppmm (t1, t0, d0, v); \
- p += t1; \
- if (p < t1) \
- { \
- v--; \
- if (MPFR_UNLIKELY (p >= d1)) \
- { \
- if (p > d1 || t0 >= d0) \
- v--; \
- } \
- } \
+#define invert_pi1(dinv, d1, d0) \
+ do { \
+ mp_limb_t v, p, t1, t0, mask; \
+ invert_limb (v, d1); \
+ p = d1 * v; \
+ p += d0; \
+ if (p < d0) \
+ { \
+ v--; \
+ mask = -(p >= d1); \
+ p -= d1; \
+ v += mask; \
+ p -= mask & d1; \
+ } \
+ umul_ppmm (t1, t0, d0, v); \
+ p += t1; \
+ if (p < t1) \
+ { \
+ v--; \
+ if (MPFR_UNLIKELY (p >= d1)) \
+ { \
+ if (p > d1 || t0 >= d0) \
+ v--; \
+ } \
+ } \
(dinv).inv32 = v; \
} while (0)
@@ -370,32 +370,32 @@ typedef struct {mp_limb_t inv32;} mpfr_pi1_t; /* We changed gmp_pi1_t into
and outputs may overlap.
*/
#undef udiv_qr_3by2
-#define udiv_qr_3by2(q, r1, r0, n2, n1, n0, d1, d0, dinv) \
- do { \
- mp_limb_t _q0, _t1, _t0, _mask; \
- umul_ppmm ((q), _q0, (n2), (dinv)); \
- add_ssaaaa ((q), _q0, (q), _q0, (n2), (n1)); \
- \
- /* Compute the two most significant limbs of n - q'd */ \
- (r1) = (n1) - (d1) * (q); \
- (r0) = (n0); \
- sub_ddmmss ((r1), (r0), (r1), (r0), (d1), (d0)); \
- umul_ppmm (_t1, _t0, (d0), (q)); \
- sub_ddmmss ((r1), (r0), (r1), (r0), _t1, _t0); \
- (q)++; \
- \
- /* Conditionally adjust q and the remainders */ \
- _mask = - (mp_limb_t) ((r1) >= _q0); \
- (q) += _mask; \
- add_ssaaaa ((r1), (r0), (r1), (r0), _mask & (d1), _mask & (d0)); \
- if (MPFR_UNLIKELY ((r1) >= (d1))) \
- { \
- if ((r1) > (d1) || (r0) >= (d0)) \
- { \
- (q)++; \
- sub_ddmmss ((r1), (r0), (r1), (r0), (d1), (d0)); \
- } \
- } \
+#define udiv_qr_3by2(q, r1, r0, n2, n1, n0, d1, d0, dinv) \
+ do { \
+ mp_limb_t _q0, _t1, _t0, _mask; \
+ umul_ppmm ((q), _q0, (n2), (dinv)); \
+ add_ssaaaa ((q), _q0, (q), _q0, (n2), (n1)); \
+ \
+ /* Compute the two most significant limbs of n - q'd */ \
+ (r1) = (n1) - (d1) * (q); \
+ (r0) = (n0); \
+ sub_ddmmss ((r1), (r0), (r1), (r0), (d1), (d0)); \
+ umul_ppmm (_t1, _t0, (d0), (q)); \
+ sub_ddmmss ((r1), (r0), (r1), (r0), _t1, _t0); \
+ (q)++; \
+ \
+ /* Conditionally adjust q and the remainders */ \
+ _mask = - (mp_limb_t) ((r1) >= _q0); \
+ (q) += _mask; \
+ add_ssaaaa ((r1), (r0), (r1), (r0), _mask & (d1), _mask & (d0)); \
+ if (MPFR_UNLIKELY ((r1) >= (d1))) \
+ { \
+ if ((r1) > (d1) || (r0) >= (d0)) \
+ { \
+ (q)++; \
+ sub_ddmmss ((r1), (r0), (r1), (r0), (d1), (d0)); \
+ } \
+ } \
} while (0)
#if defined (__cplusplus)