Yep it works with the latest git version.
Thanks
V

On Apr 4, 11:45 am, "Alexey U. Gudchenko" <[email protected]> wrote:
> Yes, this bug exists in 0.7.1 release.
>
> But, in the current master branch the result is without "Sub" (a big
> although)
>
> Could you look whether the behavior of your example is correct for
> master branch?
>
> You can retrieve latest SymPy version with the help of this instructions:
>
> [1]https://github.com/sympy/sympy/wiki/Getting-the-bleeding-edge
>
> --
> Alexey Gudchenko
>
> On 04.04.2012 12:03, vweber wrote:
>
> > Dear All
>
> > Trying to cse a long expression (that I would like to input to fcode()
> > at the end), it fails at a substitution.
> > Here is my script (sorry for the length...) and the output:
>
> > from sympy import *
> > class Ei(Function):
> >     nargs = 1
> > RHO,GRHO = symbols('RHO,GRHO')
> > R0 = symbols('R0')
> > s0 = symbols('s0')
> > a2,a3,a4,a5,a6,a7 = symbols('a2,a3,a4,a5,a6,a7')
> > b1,b2,b3,b4,b5,b6,b7,b8,b9 = symbols('b1,b2,b3,b4,b5,b6,b7,b8,b9')
> > A,B,C,D = symbols('A,B,C,D')
> > Ener=0.73855876638202240588423003268*((A +
> > 0.026121172985233599567768005819*(0.026121172985233599567768005819*GRHO*a2/
> > RHO**Rational(8,3) +
> > 0.0042217159850974071434949776337*GRHO**Rational(3,2)*a3/RHO**4 +
> > 0.00068231567812449759966283318943*GRHO**2*a4/RHO**Rational(16,3) +
> > 0.00011027617354125524509956506345*GRHO**Rational(5,2)*a5/
> > RHO**Rational(20,3) + 0.000017822885858826970814501359839*GRHO**3*a6/
> > RHO**8 + (2.8805430052207687577586593955e-6)*GRHO**Rational(7,2)*a7/
> > RHO**Rational(28,3))*GRHO/
> > ((0.16162045967399548133166141102*sqrt(GRHO)*b1/RHO**Rational(4,3) +
> > 0.026121172985233599567768005819*GRHO*b2/RHO**Rational(8,3) +
> > 0.0042217159850974071434949776337*GRHO**Rational(3,2)*b3/RHO**4 +
> > 0.00068231567812449759966283318943*GRHO**2*b4/RHO**Rational(16,3) +
> > 0.00011027617354125524509956506345*GRHO**Rational(5,2)*b5/
> > RHO**Rational(20,3) + 0.000017822885858826970814501359839*GRHO**3*b6/
> > RHO**8 + (2.8805430052207687577586593955e-6)*GRHO**Rational(7,2)*b7/
> > RHO**Rational(28,3) + (4.6555468461449301226213685042e-7)*GRHO**4*b8/
> > RHO**Rational(32,3) +
> > (7.5243162130776352437054227062e-8)*GRHO**Rational(9,2)*b9/RHO**12 +
> > 1.0000000000000000000000000000)*RHO**Rational(8,3)))*Ei(-9.5707800006273060531416555315*(A
> > +
> > 0.026121172985233599567768005819*(0.026121172985233599567768005819*GRHO*a2/
> > RHO**Rational(8,3) +
> > 0.0042217159850974071434949776337*GRHO**Rational(3,2)*a3/RHO**4 +
> > 0.00068231567812449759966283318943*GRHO**2*a4/RHO**Rational(16,3) +
> > 0.00011027617354125524509956506345*GRHO**Rational(5,2)*a5/
> > RHO**Rational(20,3) + 0.000017822885858826970814501359839*GRHO**3*a6/
> > RHO**8 + (2.8805430052207687577586593955e-6)*GRHO**Rational(7,2)*a7/
> > RHO**Rational(28,3))*GRHO/
> > ((0.16162045967399548133166141102*sqrt(GRHO)*b1/RHO**Rational(4,3) +
> > 0.026121172985233599567768005819*GRHO*b2/RHO**Rational(8,3) +
> > 0.0042217159850974071434949776337*GRHO**Rational(3,2)*b3/RHO**4 +
> > 0.00068231567812449759966283318943*GRHO**2*b4/RHO**Rational(16,3) +
> > 0.00011027617354125524509956506345*GRHO**Rational(5,2)*b5/
> > RHO**Rational(20,3) + 0.000017822885858826970814501359839*GRHO**3*b6/
> > RHO**8 + (2.8805430052207687577586593955e-6)*GRHO**Rational(7,2)*b7/
> > RHO**Rational(28,3) + (4.6555468461449301226213685042e-7)*GRHO**4*b8/
> > RHO**Rational(32,3) +
> > (7.5243162130776352437054227062e-8)*GRHO**Rational(9,2)*b9/RHO**12 +
> > 1.0000000000000000000000000000)*RHO**Rational(8,3)))*R0**2*RHO**Rational(2,3))
> > -
> > (-0.44444444444444444444444444444*(91.599829820407616454967700740*R0**4*RHO**Rational(4,3)/
> > (D +
> > 0.026121172985233599567768005819*(0.026121172985233599567768005819*GRHO*a2/
> > RHO**Rational(8,3) +
> > 0.0042217159850974071434949776337*GRHO**Rational(3,2)*a3/RHO**4 +
> > 0.00068231567812449759966283318943*GRHO**2*a4/RHO**Rational(16,3) +
> > 0.00011027617354125524509956506345*GRHO**Rational(5,2)*a5/
> > RHO**Rational(20,3) + 0.000017822885858826970814501359839*GRHO**3*a6/
> > RHO**8 + (2.8805430052207687577586593955e-6)*GRHO**Rational(7,2)*a7/
> > RHO**Rational(28,3))*GRHO/
> > ((0.16162045967399548133166141102*sqrt(GRHO)*b1/RHO**Rational(4,3) +
> > 0.026121172985233599567768005819*GRHO*b2/RHO**Rational(8,3) +
> > 0.0042217159850974071434949776337*GRHO**Rational(3,2)*b3/RHO**4 +
> > 0.00068231567812449759966283318943*GRHO**2*b4/RHO**Rational(16,3) +
> > 0.00011027617354125524509956506345*GRHO**Rational(5,2)*b5/
> > RHO**Rational(20,3) + 0.000017822885858826970814501359839*GRHO**3*b6/
> > RHO**8 + (2.8805430052207687577586593955e-6)*GRHO**Rational(7,2)*b7/
> > RHO**Rational(28,3) + (4.6555468461449301226213685042e-7)*GRHO**4*b8/
> > RHO**Rational(32,3) +
> > (7.5243162130776352437054227062e-8)*GRHO**Rational(9,2)*b9/RHO**12 +
> > 1.0000000000000000000000000000)*RHO**Rational(8,3))) +
> > 19.141560001254612106283311063*R0**2*RHO**Rational(2,3)/(D +
> > 0.026121172985233599567768005819*(0.026121172985233599567768005819*GRHO*a2/
> > RHO**Rational(8,3) +
> > 0.0042217159850974071434949776337*GRHO**Rational(3,2)*a3/RHO**4 +
> > 0.00068231567812449759966283318943*GRHO**2*a4/RHO**Rational(16,3) +
> > 0.00011027617354125524509956506345*GRHO**Rational(5,2)*a5/
> > RHO**Rational(20,3) + 0.000017822885858826970814501359839*GRHO**3*a6/
> > RHO**8 + (2.8805430052207687577586593955e-6)*GRHO**Rational(7,2)*a7/
> > RHO**Rational(28,3))*GRHO/
> > ((0.16162045967399548133166141102*sqrt(GRHO)*b1/RHO**Rational(4,3) +
> > 0.026121172985233599567768005819*GRHO*b2/RHO**Rational(8,3) +
> > 0.0042217159850974071434949776337*GRHO**Rational(3,2)*b3/RHO**4 +
> > 0.00068231567812449759966283318943*GRHO**2*b4/RHO**Rational(16,3) +
> > 0.00011027617354125524509956506345*GRHO**Rational(5,2)*b5/
> > RHO**Rational(20,3) + 0.000017822885858826970814501359839*GRHO**3*b6/
> > RHO**8 + (2.8805430052207687577586593955e-6)*GRHO**Rational(7,2)*b7/
> > RHO**Rational(28,3) + (4.6555468461449301226213685042e-7)*GRHO**4*b8/
> > RHO**Rational(32,3) +
> > (7.5243162130776352437054227062e-8)*GRHO**Rational(9,2)*b9/RHO**12 +
> > 1.0000000000000000000000000000)*RHO**Rational(8,3)))**2 +
> > 2.0000000000000000000000000000/(D +
> > 0.026121172985233599567768005819*(0.026121172985233599567768005819*GRHO*a2/
> > RHO**Rational(8,3) +
> > 0.0042217159850974071434949776337*GRHO**Rational(3,2)*a3/RHO**4 +
> > 0.00068231567812449759966283318943*GRHO**2*a4/RHO**Rational(16,3) +
> > 0.00011027617354125524509956506345*GRHO**Rational(5,2)*a5/
> > RHO**Rational(20,3) + 0.000017822885858826970814501359839*GRHO**3*a6/
> > RHO**8 + (2.8805430052207687577586593955e-6)*GRHO**Rational(7,2)*a7/
> > RHO**Rational(28,3))*GRHO/
> > ((0.16162045967399548133166141102*sqrt(GRHO)*b1/RHO**Rational(4,3) +
> > 0.026121172985233599567768005819*GRHO*b2/RHO**Rational(8,3) +
> > 0.0042217159850974071434949776337*GRHO**Rational(3,2)*b3/RHO**4 +
> > 0.00068231567812449759966283318943*GRHO**2*b4/RHO**Rational(16,3) +
> > 0.00011027617354125524509956506345*GRHO**Rational(5,2)*b5/
> > RHO**Rational(20,3) + 0.000017822885858826970814501359839*GRHO**3*b6/
> > RHO**8 + (2.8805430052207687577586593955e-6)*GRHO**Rational(7,2)*b7/
> > RHO**Rational(28,3) + (4.6555468461449301226213685042e-7)*GRHO**4*b8/
> > RHO**Rational(32,3) +
> > (7.5243162130776352437054227062e-8)*GRHO**Rational(9,2)*b9/RHO**12 +
> > 1.0000000000000000000000000000)*RHO**Rational(8,3)))**3)*(2.4000000000000000000000000000*(sqrt(A
> > +
> > 0.026121172985233599567768005819*(0.026121172985233599567768005819*GRHO*a2/
> > RHO**Rational(8,3) +
> > 0.0042217159850974071434949776337*GRHO**Rational(3,2)*a3/RHO**4 +
> > 0.00068231567812449759966283318943*GRHO**2*a4/RHO**Rational(16,3) +
> > 0.00011027617354125524509956506345*GRHO**Rational(5,2)*a5/
> > RHO**Rational(20,3) + 0.000017822885858826970814501359839*GRHO**3*a6/
> > RHO**8 + (2.8805430052207687577586593955e-6)*GRHO**Rational(7,2)*a7/
> > RHO**Rational(28,3))*GRHO/
> > ((0.16162045967399548133166141102*sqrt(GRHO)*b1/RHO**Rational(4,3) +
> > 0.026121172985233599567768005819*GRHO*b2/RHO**Rational(8,3) +
> > 0.0042217159850974071434949776337*GRHO**Rational(3,2)*b3/RHO**4 +
> > 0.00068231567812449759966283318943*GRHO**2*b4/RHO**Rational(16,3) +
> > 0.00011027617354125524509956506345*GRHO**Rational(5,2)*b5/
> > RHO**Rational(20,3) + 0.000017822885858826970814501359839*GRHO**3*b6/
> > RHO**8 + (2.8805430052207687577586593955e-6)*GRHO**Rational(7,2)*b7/
> > RHO**Rational(28,3) + (4.6555468461449301226213685042e-7)*GRHO**4*b8/
> > RHO**Rational(32,3) +
> > (7.5243162130776352437054227062e-8)*GRHO**Rational(9,2)*b9/RHO**12 +
> > 1.0000000000000000000000000000)*RHO**Rational(8,3))) -
> > 0.16162045967399548133166141102*sqrt((0.026121172985233599567768005819*GRHO*a2/
> > RHO**Rational(8,3) +
> > 0.0042217159850974071434949776337*GRHO**Rational(3,2)*a3/RHO**4 +
> > 0.00068231567812449759966283318943*GRHO**2*a4/RHO**Rational(16,3) +
> > 0.00011027617354125524509956506345*GRHO**Rational(5,2)*a5/
> > RHO**Rational(20,3) + 0.000017822885858826970814501359839*GRHO**3*a6/
> > RHO**8 + (2.8805430052207687577586593955e-6)*GRHO**Rational(7,2)*a7/
> > RHO**Rational(28,3))*GRHO/
> > ((0.16162045967399548133166141102*sqrt(GRHO)*b1/RHO**Rational(4,3) +
> > 0.026121172985233599567768005819*GRHO*b2/RHO**Rational(8,3) +
> > 0.0042217159850974071434949776337*GRHO**Rational(3,2)*b3/RHO**4 +
> > 0.00068231567812449759966283318943*GRHO**2*b4/RHO**Rational(16,3) +
> > 0.00011027617354125524509956506345*GRHO**Rational(5,2)*b5/
> > RHO**Rational(20,3) + 0.000017822885858826970814501359839*GRHO**3*b6/
> > RHO**8 + (2.8805430052207687577586593955e-6)*GRHO**Rational(7,2)*b7/
> > RHO**Rational(28,3) + (4.6555468461449301226213685042e-7)*GRHO**4*b8/
> > RHO**Rational(32,3) +
> > (7.5243162130776352437054227062e-8)*GRHO**Rational(9,2)*b9/RHO**12 +
> > 1.0000000000000000000000000000)*RHO**Rational(8,3))))*(D +
> > 0.026121172985233599567768005819*(0.026121172985233599567768005819*GRHO*a2/
> > RHO**Rational(8,3) +
> > 0.0042217159850974071434949776337*GRHO**Rational(3,2)*a3/RHO**4 +
> > 0.00068231567812449759966283318943*GRHO**2*a4/RHO**Rational(16,3) +
> > 0.00011027617354125524509956506345*GRHO**Rational(5,2)*a5/
> > RHO**Rational(20,3) + 0.000017822885858826970814501359839*GRHO**3*a6/
> > RHO**8 + (2.8805430052207687577586593955e-6)*GRHO**Rational(7,2)*a7/
> > RHO**Rational(28,3))*GRHO/
>
> ...
>
> read more »

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
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/sympy?hl=en.

Reply via email to