I saw that stackoverflow thread. In my use case, I want to reduce the 
maximum the redundancy in the expression. Or more specifically, I'm trying 
to generate code that will produce the minimum amount of costly operation 
(in my case, in addition to the ugly redundancy of constants, 2mul cost 
more than 1mul 1add). Note that Wolframalpha seems to be able to propose an 
appropriate alternate form. But anyway, I just hit another wall:

    >>> sp.factor(0.35*x + 0.35*y)
    0.35*(x + y)
    >>> sp.factor(0.35*x - 0.35*y)
    7.0*(0.05*x - 0.05*y)

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/7ead6047-30eb-43d8-90c4-f5ea54ba9074%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to