Igor Schein on Thu, 24 Apr 2003 13:27:05 -0400


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

Re: group identification patch


On Wed, Apr 23, 2003 at 02:20:17PM +0200, Bill Allombert wrote:
> On Tue, Apr 15, 2003 at 11:42:22AM -0400, Igor Schein wrote:
> > On Wed, Apr 02, 2003 at 03:05:49PM +0200, Bill Allombert wrote:
> > > Hello PARI-dev,
> > > 
> > > Here a (large) patch that add a feature similar to GAP IdGroup
> > > function for weakly super-solvable group.
> > 
> > It worked fine for me in preliminary testing, I'd like to see it
> > committed ASAP.  It's a few percentage points faster than the kludge
> > I've devised, and is definitely less cumbersome.
> 
> Done. The GP function is galoisidentify and the code is in 
> src/modules/groupid.c
> 
> Cheers,
> Bill.

Right now I am using the following wrapper around galoisidentify() to
ensure I never get an error:

install(galoisconj4,"GDGD1,L,D0,L,");
idg(pol,gal)=polisirreducible(pol)||return(0);gal||gal=galoisconj4(pol);type(gal)=="t_VEC"&&return(galoisidentify(gal))

That's the best I could have done.  It illuminates the chief
shortcomings of galoisinit() - no argument checking ( as in this:

? galoisinit(x^2-1)
  ***   not enough precomputed primes

) and no usable exit status.  A crude analogy - on unix every command
either returns zero on success or non-zero on top of any error
messages on failure.  Here, it'd make sense for galoisinit() ( and
many other functions as well) to return ( optionally silently, to
reduce noise for running batches of polynomials ) zero on failure.  I
suppose checking for irreducibility could be expensive, but returning
zero on irreducible non-Galois input is at no extra cost.  Without
that functionality, I have to install() galoisconj4, per Bill's
earlier suggestion, and if I'm on a platform which doesn't support
install(), then I either have to run an equivalent of galoisinit()
twice or use trap(), which is horror.  So any improvement would be a
welcome sign. 

Thanks

Igor