Why does simplify not try factor?

1 view
Skip to first unread message

Neal Becker

unread,
Nov 4, 2009, 8:02:47 AM11/4/09
to sy...@googlegroups.com
In [81]: 3*Rs - Rs*alpha
Out[81]: 3*Rs - Rs*alpha

In [82]: simplify(_)
Out[82]: 3*Rs - Rs*alpha

smichr

unread,
Nov 4, 2009, 9:12:36 AM11/4/09
to sympy
Just my 2c worth here:

sympy leaves some things up to the user's discretion. There's no
reason that factoring couldn't be done, but that is a whole other
level of analysis. If you were working with integers, for example and
you had an expression like 3*(4+1*(3-4)) it's reasonable to think of
the simplification giving you simply 9 rather than 3**2. Perhaps you
could think of the same applying to symbolic expressions.

For both integers and expressions there is the factor function
available. A problem that is being fixed with the coming changes to
polys is that there were many sorts of expressions that weren't able
to be factored., e.g. the recent post about fatoring a polynomial with
rational numbers. So perhaps factoring was avoided for that reason.
But I think the first comments are the more important reason.

Again, just some thoughts.
Reply all
Reply to author
Forward
0 new messages