Updates:
        Cc: smi...@gmail.com

Comment #10 on issue 3059 by asmeu...@gmail.com: (x - oo).has(oo) is False; (x - oo).subs(oo, 1) fails
http://code.google.com/p/sympy/issues/detail?id=3059

* Code that assumes that the product of two Numbers is a Number is wrong: there are many counter-examples such as pi*pi or 2*E.

Oh, well that was my mistake. What I really meant was the coeff from as_coeff_Mul is assumed to be so. I thought that these were all Numbers, but I forgot about symbolic numbers. Should we perhaps have another base class for such Numbers (Float, Rational, Integer)? That would at least make it easier to talk about such things.

Actually, fixing this should just require making sure that oo.as_coeff_Mul() returns (1, oo) instead of (oo, 1) as it does now. Then, Mul.flatten() will need to be recoded to handle oo. I'm still trying to figure out the best way to do this. Maybe someone who's more familiar with the logic there can suggest a way.

* If you want to define S.NegativeInfinity for backwards compatibility, you can do it at the bottom of numbers.py, just after the line "Mul.identity = One()".

Not just for backwards compatibility, but also so that it remains singletonized.

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