I think the discussion at https://github.com/sympy/sympy/pull/2070 is
relevant here, because that is just another case of the same thing
(evaluating a function at a numbers).

To quote an argument from Raoul on when this should happen

"Today in irc, I argued that there should be two heuristic rules when
auto-evaluation is in general allowed because it too often leads to
useful results and always calling a variant of simplify gets annoying
rather soon. The two rules were:

"1.) Argument is a special value. These special values should include:
0, 1, -1, 1/2, -1/2, I, -I, I/2, -I/2, oo, -oo, I*oo, -I*oo, ... but
not 23/74, 15*x but 2*x is already at the border ...

"2.) The general heuristic should be that no "new" special functions
appear in the result. (Or at least only simpler ones.) (The example
there was that erf(something).rewrite(uppergamma) immediately gets you
back an erf, because uppergamma auto-simplifies. But the same problem,
auto-simplification of functions, occurs all over sympy.)"

Aaron Meurer

On Thu, May 2, 2013 at 11:46 PM, Chris Smith <[email protected]> wrote:
> The perfect power of base was there before issue 1827 which I worked
> on...things would work via simplify if auto-simplification were not there
>
>>>> log(10)-log(2)-log(5)
> -log(5) - log(2) + log(10)
>>>> simplify(_)
> 0
>>>> log(16,evaluate=False)-log(16)
> -4*log(2) + log(16)
>>>> simplify(_)
> 0
>
> At least I think it would still work...ya' never know until ya' try.
>
> Somewhere we need to decide what should and should not be done
> automatically...we combine ``x + x`` to ``2*x`` and write ``2**2 as 4`` and
> issue 2302 dealt with how powers are automatically simplified
> (``2**Rational(4,5)*6**Rational(1,5) -> 2*3**Rational(1,5)``).
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sympy?hl=en-US.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to