Bill Allombert on Mon, 08 Dec 2008 11:41:54 +0100

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

Re: Using {fa} in nfdisc() computations

On Sun, Dec 07, 2008 at 08:08:28PM -0700, Kurt Foster wrote:
> The optional {fa} parameter [factor() matrix]  seems like just the  
> thing for speeding up the computations in a situation I'm looking at.   
> I've got a parametric family of polynomials.  I want the exact  
> nfdisc()s for a whole swarm of them.  I could, of course, just feed  
> the polynomials to nfdisc() and let it crunch away.  This does work,  
> of course, but  it occurred to me it might be faster if I could take  
> advantage of the fact that the poldiscs have a parametric algebraic  
> factorization, and the algebraic factors are generally much smaller  
> than the poldisc(), in the sense that
> log(abs(algebraic factor))/log(abs(poldisc)
> will usually be a lot less than 1.  Thus, factoring the algebraic  
> factors should be a LOT quicker than tackling the whole poldisc.
> But in order to produce the factor() matrix fa for the poldisc, I've  
> got to "combine" the factorization matrices of the algebraic factors.   
> There's probably a slick way to do this, but I'm a dunce at  
> programming.  Would factor()ing the algebraic factors and "combining"  
> the results actually be likely to be faster than tackling the whole  
> poldisc?  If so, what's an expeditious way to combine the factor()  
> matrices of the separate algebraic factors into the correct factor()  
> matrix for the poldisc?

You can totally cheat and use default(factor_add_primes,1) to
record the prime factors automatically.

Then you only need to factor the algebraic factors and then
ask for the discriminant.
You can then use removeprimes(addprimes()) from time to time
to avoid the "addprimes" vector to be too large (but not too often
if you expect some discriminants to have common primes factors).