TO USE:
http://sage.math.washington.edu/home/was/pynac/pynac-0.1.spkg
- Apply this bundle to sage-3.1.1:
http://sage.math.washington.edu/home/was/pynac/pynac.hg
The goal of this ticket:
- Remove all dependency of ginac (http://www.ginac.de/) on CLN, so (a) Ginac builds in 2 minutes, (b) Ginac makes use of libraries like MPFR that are better than cln, and (c) in the future ginac will be able to work directly with *any* Sage objects.
- Create a symbolic arithmetic class that works like below in parallel with the existing sage symbolics, but is far from feature complete.
sage: var("x y",ns=1)
(x, y)
sage: type(x)
<type 'sage.symbolic.expression.Expression'>
sage: expand((x^3*tan(x*y^x) + sin(y) - cos(y))^2)
cos(y)^2-2*cos(y)*sin(y)-2*cos(y)*x^3*tan(y^x*x) + x^6*tan(y^x*x)^2 + sin(y)^2 + 2*x^3*sin(y)*tan(y^x*x)
sage: timeit('expand((x^3*tan(x*y^x) + sin(y) - cos(y))^2)')
625 loops, best of 3: 107 µs per loop
sage: var("x y")
(x, y)
sage: timeit('expand((x^3*tan(x*y^x) + sin(y) - cos(y))^2)')
5 loops, best of 3: 24.5 ms per loop
sage: 24.5/(107*(10^(-3)))
228.971962616822
sage: x = sympy.var('x'); y = sympy.var('y')
sage: timeit("((x^3r * sympy.tan(x*y^x) + sympy.sin(y) - sympy.cos(y))^2r).expand()")
625 loops, best of 3: 691 µs per loop
The above would go in *before* any of this replaces the existing symbolic framework.
Once the above two steps are done and the spkg passes review, this ticket should be closed. Only then should a more refined attack on the problem be carried out.