On Mar 7, 2011, at 1:52 PM, Kate MacInnis wrote: > Well, I've been making some good progress. I wrote a function > "distribute()" to perform the distribution of constants into Adds > where needed. I toyed with just making it a hint to expand, but then > every time you called it, you'd have to explicitly turn off all the > other behavior that you don't want and have: > expand(distribute_constant=True, power_base=False, power_exp=False, > mul=False, log=False, basic=False) > each time. So it made more sense to put that into a separate function.
Yes, Chris's hint manager was to make this easier so you could just call distribute_constant=True, and it would automatically make all the others false. But it was never finished. > > I've got most tests working, although there are still several to fix. > > There is some unexpected, but not necessarily broken behavior. > Denominators seem to be automatically rationalizing themselves in some > places that they didn't before. Is that acceptable behavior? Can you give an example of what you mean here? > > Another unexpected one was this: > In [6]: (((x**2*y**4)**a)**(x*y))**3 > Out[6]: > 3 > ⎛ x⋅y⎞ > ⎜⎛ a⎞ ⎟ > ⎜⎜⎛ 2 4⎞ ⎟ ⎟ > ⎝⎝⎝x ⋅y ⎠ ⎠ ⎠ > > In [7]: powdenest(_) > Out[7]: > 6⋅a⋅x⋅y > ⎛ 2⎞ > ⎝x⋅y ⎠ > > instead of the > 3⋅a⋅x⋅y > ⎛ 2 4⎞ > ⎝x ⋅y ⎠ > that the test wants. Is there some reason that the two wasn't > supposed to be pulled out? Chris will have to answer this one. Aaron Meurer -- 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.
