Comment #5 on issue 1729 by smichr: doctest failure on new master for
Windows 32 sys
http://code.google.com/p/sympy/issues/detail?id=1729
{It's a little tricky trying to carry this conversion on at two different
places...this is part of what I was talking about when I raised the issues
with the review process.}
The only failure I get is in the expression
(fibonacci(1000) - (GoldenRatio)**1000/sqrt(5))
This is evaluated (apparently) recursively and I see the following at line
941 in mul.py after making the modifications shown:
if myFlag == True:
print Mul(*comms_final),old,new
try:
return Mul(coeff_self/coeff_old, new,
Mul(*comms_final)._eval_subs(old,new))#*[c._eval_subs(old,new) for c in
comms_final])
except:
stop
else:
OUTPUT:
(fibonacci(1000) - (GoldenRatio)**1000/sqrt(5))
p1_*p2_**999 p2_ GoldenRatio
p1_*p2_**998 p2_ GoldenRatio
p1_*p2_**997 p2_ GoldenRatio
p1_*p2_**996 p2_ GoldenRatio
...
p1_*p2_**46 p2_ GoldenRatio
p1_*p2_**45 p2_ GoldenRatio
At this point the maximum recursion depth is exceeded and I get that error.
That expression is, I think, being evaluated unnecessarily in a recursive
manner. It is possible to evaluate the two terms independently without a
problem:
fibonacci(1000) , (GoldenRatio)**1000/sqrt(5)
(4346655768693745643568852767504062580256466051737178040248172908953655541794905
18904038798400792551692959225930803226347752096896232398733224711616429964409065
33187938298969649928516003704476137795166849228875,
5**(1/2)*GoldenRatio**1000/5
)
N(_[0]) - N(_[1])
-1.55051692864504e+192
There is a problem in operations in that a substitution is made which
generates None but this is assumed not to happen so it creates a failure.
But this in itself is not enough of a fix: in t2 I have worked that fixed
Mul._eval_subs. Taken together (as shown in branch 1729) they solve this
problem but then other errors show up. I think the lurking problem is
that .subs is returning a None in some cases. I don't have time to pursue
it for another 10 hours or so.
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" 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-issues?hl=en.