Comment #10 on issue 1827 by asmeurer: log eval gives more standard form
http://code.google.com/p/sympy/issues/detail?id=1827
logcombine can do that, but you have to have the proper assumptions on x,
or else use the assume_pos_real flag:
In [14]: logcombine(x*log(10)-x*(log(2)+log(5)), assume_pos_real=True)
Out[14]: 0
In [15]: x = Symbol('x', real=True)
In [16]: logcombine(x*log(10)-x*(log(2)+log(5)))
Out[16]: 0
So you probably have code duplication. logcombine is supposed to be the
opposite of expand(log=True) anyway.
I don't know how you would stop Python from evaluating 2**reallybignumber
before log gets to it. The only option is to
pass it to Pow with eval=False, or maybe sympify could be smart enough
about it. Actually, the evaluate=False gives some
other bug, which seems to show up every time you try to do seomthing with
an evaluate=False expression:
In [17]: log(Pow(2,9182340981273490812734, evaluate=False))
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
[…]
AttributeError: is_commutative
And I'm actually starting to think that maybe it could be in eval, if there
is a limit on the factors :) But just the log eval. If
the user wants more complex simplification, he can use expand(log=True) or
logcombine.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" 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-issues?hl=en.