On Wed, Apr 16, 2008 at 4:16 PM, Friedrich Hagedorn <[EMAIL PROTECTED]> wrote:
>
>  On Wed, Apr 16, 2008 at 03:48:20PM +0200, Ondrej Certik wrote:
>  > That's the automatic evaluation:
>  >
>  > In [1]: L, C = symbols("LC")
>  >
>  > In [2]: sqrt(L/C)
>  > Out[2]:
>  >   ⎽⎽⎽
>  > ╲╱ L
>  > ─────
>  >   ⎽⎽⎽
>  > ╲╱ C
>  >
>  > In [3]: print sqrt(L/C)
>  > C**(-1/2)*L**(1/2)
>  >
>  >
>  > Basically, it's the same problem as with:
>  >
>  > In [7]: f = (x*y)**2
>  >
>  > In [8]: f
>  > Out[8]:
>  >  2  2
>  > x *y
>  >
>  > Should we do this be default? Or should we handle it like with log:
>  >
>  > In [1]: e=log(k*m)
>  >
>  > In [2]: e.expand()
>  > Out[2]: log(k) + log(m)
>
>  I prefer the expr.expand() variant.
>
>  I have a big expr where sqrt(L/C) is only a tedious coefficiant. Then
>  I want to derivate this big expr.diff(t) and when I read the
>  result I want recogize fastly the old coefficiants.
>
>  But have you an other example where is the automatic eval good for?

Well, so far we considered this as part of what you'd do by hand and
thus it's useful. That's the only reason. Plus other CAS systems imho
do the same.

Ondrej

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to