I was trying to execute a large script, which I had generated
automatically with a view to testing Sage at integrating and
differentiating random polynomials.
The script looks a bit like this, but has many entries, with each
polynomial generated randomly.
f1=+2-2*x+2*x^2+2*x^3+4*x^4-1*x^5+3*x^6
f1
intf1=integrate(f1,x)
f2=diff(intf1,x)
ans=f1.full_simplify() - f2.full_simplify()
if ans != 0:
print "Error when integrating ", (f1), " answer got was ", (ans)
else:
print "OK integrating ", (f1)
etc
I used
$ sage < scriptfile
but it eventually fails with:
sage: sage: sage: sage: ....: ....: ....: ....: OK integrating -4*x^6
+ x^5 - 3*x^4 + 3*x^3 - 4*x^2 + 4
sage: sage: 2*x^6 + 3*x^5 + x^4 - 4*x^2 - 2
sage: sage: sage: sage: ....: ....: ....: ....: OK integrating 2*x^6
+ 3*x^5 + x^4 - 4*x^2 - 2
sage: sage: 3*x^6 - 3*x^5 - 3*x^4 + 3*x^2 + x - 3
sage: sage: sage: sage: ....: ....: ....: ....: OK integrating 3*x^6
- 3*x^5 - 3*x^4 + 3*x^2 + x - 3
sage: sage: -x^6 + 2*x^5 - 3*x^3 - 3*x^2 + 3*x
sage: sage: sage: sage: ....: ....: ....: ....: OK integrating -x^6 +
2*x^5 - 3*x^3 - 3*x^2 + 3*x
sage: sage: -2*x^6 + x^2 - 4*x + 3
sage: sage: sage: sage: ....: ....: ....: ....: OK integrating -2*x^6
+ x^2 - 4*x + 3
sage: sage: -4*x^6 - 2*x^4 - 3*x^3 - 4*x + 1
sage: sage: sage: sage: ....: ....: ....: ....: OK integrating -4*x^6
- 2*x^4 - 3*x^3 - 4*x + 1
sage: sage: x^6 - 2*x^5 + 2*x^4 - 3*x^3 - x^2 - x + 1
WARNING: Output cache limit (currently 1000 entries) hit.
Flushing cache and resetting history counter...
The only history variables available will be _,__,___ and _1
with the current result.
sage: sage: sage: sage: ....: ....: ....: ....: OK integrating x^6 -
2*x^5 + 2*x^4 - 3*x^3 - x^2 - x + 1
sage:
Exiting Sage (CPU time 0m52.12s, Wall time 1m30.11s).
Exiting spawned Maxima process.
Any ideas how I can process a script which has thousands or even
perhaps millions of lines?
Any idea why there are so many Sage prompts?
Dave
--
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org