On Sun, Dec 18, 2011 at 7:05 PM, Chris Smith <[email protected]> wrote: > On Sun, Dec 18, 2011 at 7:32 PM, Vincent MAILLE <[email protected]> wrote: >> Hello, >> >> I'm programming a function whitch give the definition set of an >> expression (e.g : ln(x+1) => ]-1;+oo[ ). My problem is sympy >> simplifies too quick my expression : >> >> print x/x return 1 before I can extract the 1/x operation (and so >> return x<>0). How to say sympy not to symplify ? > > Maybe this is what you mean? > >>>> xx=Mul(x,1/x,evaluate=0) >>>> log(xx+1) > log(1 + x/x) >
If http://code.google.com/p/sympy/issues/detail?id=1966 were fixed, you would be able to just do sympify('x/x', evaluate=False). By the way, do you know about the Interval class (or more generally, the Set classes) in SymPy? It doesn't use the same notation as you do in printing, but this can be easily fixed by modifying the printer if you dislike it. Aaron Meurer -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
