diff options
author | tege <tege@gmplib.org> | 2002-04-17 18:51:12 +0200 |
---|---|---|
committer | tege <tege@gmplib.org> | 2002-04-17 18:51:12 +0200 |
commit | 2914dc78d83c335a7308931072c9c047ecd607dd (patch) | |
tree | 6e0ab6152a3aa9e1b161a3bc2a51427fedf7748a /mpz/fac_ui.c | |
parent | 78c3f1169196d41324ee99988888745aa90d896f (diff) | |
download | gmp-2914dc78d83c335a7308931072c9c047ecd607dd.tar.gz |
Nailify.
Diffstat (limited to 'mpz/fac_ui.c')
-rw-r--r-- | mpz/fac_ui.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mpz/fac_ui.c b/mpz/fac_ui.c index 65345fad3..0142ab07a 100644 --- a/mpz/fac_ui.c +++ b/mpz/fac_ui.c @@ -135,9 +135,14 @@ mpz_fac_ui (mpz_ptr result, unsigned long int n) /* Multiply the partial product in P with K. */ umul_ppmm (p1, p0, p, (mp_limb_t) k); +#if GMP_NAIL_BITS == 0 +#define OVERFLOW (p1 != 0) +#else +#define OVERFLOW ((p1 | (p0 >> GMP_NUMB_BITS)) != 0) +#endif /* Did we get overflow into the high limb, i.e. is the partial product now more than one limb? */ - if (p1 != 0) + if OVERFLOW { tree_cnt++; |