Is it ok to try to revive this posting? It would be a great help to me if fast_float() could be gotten to work on large polynomials (>60,000 terms).
I suppose that fast_float() makes a space-time tradeoff that might be insurmountable. Still, the fact that fast_float(p) kills the worksheet namespace when p is a polynomial with >60,000 terms suggests the possibility of a bug. So far, sage/numpy has succeeded in minimizing a 4th degree polynomial in 100 variables containing 1,000,000 terms in 18,000s cpu time, after using fast_float() on each component of the gradient before supplying the gradient to minimize(). For larger problems, fast_float() fails on the components of the gradient. Without using fast_float(), sage/numpy succeeded in minimizing a 4th degree polynomial in 120 variables containing 2,000,000 terms in 145,000s cpu time. I'm presently trying to minimize a 4th degree polynomial in 144 variables containing 4,000,000 terms, again without fast_float(). I can't be sure that fast_float() would give this calculation any better chance of finishing within my lifetime, but it would at least lift my hopes. thanks, Daniel Friedan On Jul 20, 11:00 am, Daniel Friedan <[email protected]> wrote: > fast_float(p) trashes the worksheet namespace when p is a polynomial > with 60,000 terms. I tried to pin down the minimum number of terms > that produce this bug, arriving at 56093, but the bug was not > consistent. (Sage 4.3.4 under Linux, Sage 4.4.4 under OS X 10.6.4) > > sage: Nterms = 60000 > sage: RQ = PolynomialRing(QQ, 1, 'x', sparse=True) > RQ.inject_variables(); vars = RQ.gens(); var=vars[0] > > Defining x > > sage: p=0; > for k in range(Nterms): > p += var^k; > p in RQ > > True > > sage: len(p.coefficients()) > > 60000 > > sage: g=fast_float(p) > sage: Nterms > > Traceback (click to the left of this block for traceback) > ... > NameError: name 'Nterms' is not defined -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
