Keeping symbolic expressions raw

24 views
Skip to first unread message

Milos Bogataj

unread,
Mar 31, 2015, 10:40:31 AM3/31/15
to sy...@googlegroups.com
Is it possible to work with raw symbolic expressions without any simplifications/evaluations?
e.g: If I have an expression: 2*((x)), I would like to keep it as it is without Sympy changing it to 2*x.
Cheers,
Milos

Paul Royik

unread,
Mar 31, 2015, 10:58:43 AM3/31/15
to sy...@googlegroups.com
No, there is no way.

You can use evaluate=False, when creating expressions, but it will help partly.

For example, Add(4*x*y,-6*x*y, evaluate=False) will output -6xy+4xy (notice order changed), but Add(4*x*y,-6*x*y) will output -2xy
Reply all
Reply to author
Forward
0 new messages