Igor Schein on Fri, 28 Feb 2003 17:08:39 -0500


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

Re: gp: a/b/c == (a/c)/b ?


On Fri, Feb 28, 2003 at 12:46:16PM -0500, Michael Somos wrote:
> pari-dev,
> 
> Igor Schein asked :
> 
> > Did you try starting a clean session, preferably with -f flag?  I
> > think it'll work correctly.  At least it works for me in latest CVS.
> 
> I just did a "make" using the latest CVS a few minutes ago. I still get
> 
> parisize = 4000000, primelimit = 500000
> ? a/b/c == a/c/b
> %1 = 1
> ? c/a/b == c/b/a
> %2 = 0
> ? \v
>           GP/PARI CALCULATOR Version 2.2.6 (development CHANGES-1.681)
>            UltraSparc (MicroSparc kernel) 32-bit version -- debugging
>               (readline v2.2 enabled, extended help not available)
> 
> Shalom, Michael

Right, now I see what the issue is here:

? c;b;print(a/b/c)
a/b/c

It depends on the order in which the variables are introduced to the
stack.  It's been like this forever, but it's definitely wrong.

Igor