Bill Allombert on Thu, 18 Jun 2015 00:12:23 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: incorrect type in gpow(0,n) (t_VEC) |
On Thu, Feb 12, 2015 at 04:33:06PM +1100, Kevin Acres wrote: > Hi, > > I've noticed recently that something like [1,2,3]^[2] works fine, > whereas if any element is zero I get an error: > > ? [0,2,3]^[2] > *** at top-level: [0,2,3]^[2] > *** ^---- > *** _^_: incorrect type in gpow(0,n) (t_VEC). > *** Break loop: type 'break' to go back to GP prompt > > Is there a work around for this? > > As background I need to perform sqrt(vecsum(x^[2])) so maybe there > is a better way of obtaining the same result. > > I'm using version 2.7.2 under 64 bit linux. Karim has fixed this bug, see http://pari.math.u-bordeaux.fr/Bugs/1713 However, we advise against using this construct and use apply instead. Cheers, Bill.