[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: divisibility tests
From: |
Kevin Ryde |
Subject: |
Re: divisibility tests |
Date: |
Sat, 23 Nov 2002 09:38:09 +1000 |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.1 (i386-debian-linux-gnu) |
Jason Moxham <address@hidden> writes:
>
> For consistency mpz_divisible_p
> should do the same when testing for divisibility by zero.
And an even better argument is that there's no cause to throw an
exception when a sensible return value is possible.
So yes let's go with your suggestion (for version 4.2). With d==0
mpz_divisible will test for n==0 and mpz_congruent will test for n==c,
ie. exact equality.
> A note in the docs should mention that that the divisibility tests can raise
> an exception.
It was sort of meant to be covered by the general statement at the top
of the section about zero divisors. Now it can describe the new
behaviour.