> I have a few comments:
> * The call to expand() is slow and unnecessary. At this stage, all
> that's needed is to call _eval_expand_multinomial(deep=False). So
> instead of:
> +            return 1 / Pow(base, -exp.p).expand(deep=deep, **hints)
> we should have:
> +            return 1 / Pow(base,
> -exp.p)._eval_expand_multinomial(deep=False)

Yes, I think you are right.  I will prepare a patch that changes it to
what you have and makes sure that all the tests pass.

>
> * This line suggests that it would be helpful to create an 'inverse'
> property - less work is needed to create this inverse than for a generic
> Pow instance.

Could you elaborate on what you mean here?  Do you mean an inverse
property to Pow instances which have a integer exponent?  Perhaps
'reciprocal' instead of 'inverse'?

> * There should be more tests for negative exponents, basically
> duplicating all existing tests with positive exponents

Yes, I agree.

> *I don't see the point of the third test: it's only testing that (x
> +y)**2*(x+y)**-4 == (x+y)**-2 which isn't related to expand.

Yes, you are right, it isn't testing expand but I guess it probably
doesn't hurt to keep it in either.

~Luke

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy-patches" group.
To post to this group, send email to sympy-patches@googlegroups.com
To unsubscribe from this group, send email to 
sympy-patches+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sympy-patches?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to