| Karim BELABAS on Mon, 18 Oct 1999 14:59:08 +0200 (MET DST) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: Lack of error message in Mod |
[Jack Fearnley:]
> The Pari manual states that the the first argument of Mod must be an
> integer, scalar or polynomial.
>
> The following illegal usage
>
> Mod(1+O(7^15),7)
It's actually not illegal; the manual was at fault here. I just corrected the
manual; it now reads:
Mod(x,y,{flag = 0}):
creates the PARI object (x mod y), i.e. an integermod or a polmod. y
must be an integer or a polynomial. If y is an integer, x must be an
integer, a rational number, or a p-adic number compatible with the modulus y.
If y is a polynomial, x must be a scalar, a polynomial, a rational function,
or a power series. [...]
I had to modify slightly the function so that it is consistent with the new
description (power series were not allowed for polynomial modulus, whereas
p-adics were for integral y. It's symmetric now). I also changed the error
message "forbidden type mod I in gmod" which was a bit cryptic.
[all these changes have been committed to the CVS repository]
> Gives an error message in version 2.0.5 but silently returns zero in
> 2.0.16. It also returns zero for
>
> Mod(1+)(7^15),3) and Mod(1.0,7)
All of these had been corrected in the last release (2.0.17).
Cheers,
Karim.
__
Karim Belabas email: Karim.Belabas@math.u-psud.fr
Dep. de Mathematiques, Bat. 425
Universite Paris-Sud Tel: (00 33) 1 69 15 57 48
F-91405 Orsay (France) Fax: (00 33) 1 69 15 60 19
--
PARI/GP Home Page: http://hasse.mathematik.tu-muenchen.de/ntsw/pari/