Bill Allombert on Tue, 17 Jul 2012 19:40:34 +0200


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

Re: (Mod(1,2)*x*y)^0


On Tue, Jul 17, 2012 at 06:16:25PM +0100, Phil Carmody wrote:
> --- On Tue, 7/17/12, Bill Allombert wrote:
> > ? (Mod(1,2)*x*y)^0
> > %3 = 1
> > 
> > Is it intended ?
> 
> Violating distributivity doesn't sound like a good idea:
> 
> ? Mod(1,2)^0*x^0*y^0
> Mod(1, 2)
> 
> Simpler expressions show the loss of type too:
> ? (Mod(1,2)*x)^0*y
> y

I think this one bug is fixed in PARI 2.5 already. 
PARI 2.3 did not have the ^0 code so returned
? (Mod(1,2)*x)^0
%1 = 1

which was fixed.

Cheers,
Bill.