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/
> ((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)))**Rational(7,2) -
> 1.2000000000000000000000000000*(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*A -
> 1.4179630807244128218385339867*(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)))**Rational(7,2) -
> 0.40000000000000000000000000000*(-0.013060586492616799783884002909*(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)*C*RHO**Rational(8,3)) -
> 0.00096745085130494813213955577106*GRHO/
> ((0.026121172985233599567768005819*GRHO/(RHO**Rational(8,3)*s0**2) +
> 1.0000000000000000000000000000)*C*RHO**Rational(8,3)) +
> 1.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)))*C -
> 0.26666666666666666666666666667*(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*B) -
> 0.44444444444444444444444444444*(9.5707800006273060531416555315*(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)))*R0**2*RHO**Rational(2,3)
> +
> 1.0000000000000000000000000000)*(-0.013060586492616799783884002909*(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)*C*RHO**Rational(8,3)) -
> 0.00096745085130494813213955577106*GRHO/
> ((0.026121172985233599567768005819*GRHO/(RHO**Rational(8,3)*s0**2) +
> 1.0000000000000000000000000000)*C*RHO**Rational(8,3)) +
> 1.0000000000000000000000000000)*C/(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 -
> 0.44444444444444444444444444444*B/(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))))*exp(-9.5707800006273060531416555315*(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)     )))))
> 
> reps, eqs = cse(Ener,symbols=symbols('t:10000'))
> numbered_e = symbols('Ener,')
> 
> print 'eqs=',eqs
> 
> <<<<<
> 
> The output is
> 
>>>>>>
> 
> eqs= [(0.738558766382022*A +
> 0.738558766382022*t33)*Ei(t17*(-9.57078000062731*A - t35)) -
> 0.738558766382022*exp(-9.57078000062731*GRHO*t27/t26 -
> t4)*((-8.5073600005576*t17*t38 - 0.888888888888889*t38**(3/2) -
> 40.7110354757367*t2**2*t36/t14**(1/4))*(-1.2*A/t38**(3/2) -
> 0.266666666666667*B/t38 - C*t34*(-0.000386980340521979*t15*t25 +
> 0.4*t15*t3*t30*(-0.000341157839062249*GRHO*a2*t11 -
> 5.51380867706276e-5*a3*t18 - 1.44027150261038e-6*a5*t21 -
> 2.32777342307247e-7*a6*t16 - 3.76215810653882e-8*a7*t20 -
> 8.91144292941349e-6*t22) + 0.4) +
> t37*(-0.387889103217589*(t15*t30*(0.0261211729852336*a2*t15 +
> 0.00422171598509741*a3*t18 + 0.000110276173541255*a5*t21 +
> 1.7822885858827e-5*a6*t16 + 2.88054300522077e-6*a7*t20 +
> 0.000682315678124498*t22))**(1/2) + 2.4*(A + t33)**(1/2)) -
> 1.41796308072441*t37) - (0.444444444444444*B*t36 +
> C*t38*(0.444444444444444*t17*(t35 + t4) +
> 0.444444444444444)*(Sub(t15*t3*t30*(-0.000341157839062249*GRHO*a2*t11
> - 5.51380867706276e-5*a3*t18 - 1.44027150261038e-6*a5*t21 -
> 2.32777342307247e-7*a6*t16 - 3.76215810653882e-8*a7*t20 -
> 8.91144292941349e-6*t22) + 1.0, 0.000967450851304948*t15*t25))))]
> 
> <<<<<
> 
> so the "Sub(t15*t3*t3...." is my problem.
> Any idea how to fix that?
> 
> Thanks
> 
> Valery
> 

-- 
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