Comment #1 on issue 4022 by [email protected]: powdenest won't denest a power
http://code.google.com/p/sympy/issues/detail?id=4022
It doesn't know the sign of y - 1 even though y is made positive with the
force option. If *you* know it's positive you can replace it with a single
symbol and then back substitute. You wouldn't blindly want to make all
bases positive since if there were a 1 - y and y - 1 base they couldn't
both be positive. There might be more complicated related expressions that
couldn't simultaneously be positive, so I'm not sure if this can be fixed
or is that robust of a solution.
One suggestion would be to do a cse on all bases and replace them with
symbols:
bases = [i.base for i in eq.atoms(Pow)]
reps = dict(cse(bases)[0])
rev = dict([(v,k) for k,v in reps.iteritems()])
print powdenest(eq.xreplace(rev),force=True).xreplace(reps)
-8*2**(2/3)/(3*nu**(1/3)*(y_i - 1)**(8/3)
ymmv, especially wrt the caveat indicated above.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy-issues.
For more options, visit https://groups.google.com/groups/opt_out.