Michael Somos on Mon, 1 Nov 1999 19:20:48 -0500 (EST)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Bugs...


Bill Allombert wrote :

> ? O(y^-32690)^2
> %7 =   ***   segmentation fault: bug in GP (please report).

Curious. I was only able to get this :

                    GP/PARI CALCULATOR Version 2.0.17 (beta)
                i686 running linux (ix86 kernel) 32-bit version
              (readline v2.2 enabled, extended help not available)

parisize = 4000000, primelimit = 500000
gp> O(x^-16384)^2
%1 = O(x^-32768)
gp> O(x^-16385)^2
%2 = 36*#^32766 + O(#^32767)
gp> O(y^-32690)^2
%3 = 2016*#^156 + O(#^157)
gp> O(x^-16385)^2
%4 = 1984*#^32766 + O(#^32767)

Clearly, large negative powers here are unwise. A caution in the
documentation about exponents < -32768 would be appropriate I think.
Certainly, I can imagine very limited uses for them. The tradeoff
is to detect such cases and trigger error mesage, or else to let
them take their course. Any software project is a balancing of many
choices. I don't think there can be universal agreement of what is
an appropriate choice. In any case, I did not get the seg fault. It
may be OS or memory size dependant. Shalom, Michael