diff options
author | Kevin Ryde <user42@zip.com.au> | 2002-12-12 21:56:29 +0100 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2002-12-12 21:56:29 +0100 |
commit | b7418829cc6a34dd48c004c82fcd660d2bc5136e (patch) | |
tree | 1a8222cc40d19a616ad422e0268bbd6820cd5174 /mpz/divis_ui.c | |
parent | 3aa1afc5bb5838ead00df41de810cb420d1d6f94 (diff) | |
download | gmp-b7418829cc6a34dd48c004c82fcd660d2bc5136e.tar.gz |
* mpz/divis.c, mpz/divis_ui.c, mpz/cong.c, mpz/cong_ui.c: Allow d=0,
under the rule n==c mod d iff exists q satisfying n=c+q*d.
Diffstat (limited to 'mpz/divis_ui.c')
-rw-r--r-- | mpz/divis_ui.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mpz/divis_ui.c b/mpz/divis_ui.c index 9d053ba87..1d5dc3cb2 100644 --- a/mpz/divis_ui.c +++ b/mpz/divis_ui.c @@ -31,10 +31,10 @@ mpz_divisible_ui_p (mpz_srcptr a, unsigned long d) mp_ptr ap; unsigned twos; - if (d == 0) - DIVIDE_BY_ZERO; - asize = SIZ(a); + if (UNLIKELY (d == 0)) + return (asize == 0); + if (asize == 0) /* 0 divisible by any d */ return 1; |