#17556: Move simplify_log() from simplify_full() to simplify_real()
-------------------------------------+-------------------------------------
       Reporter:  mjo                |        Owner:
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.5
      Component:  symbolics          |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Michael Orlitzky   |    Reviewers:  Ralf Stephan
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/mjo/ticket/17556                 |  044db1d2b7bc4e914e92ed7aa87629cbe958bc52
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by mjo):

 Replying to [comment:4 kcrisman]:
 >
 > That said, I'm not 100% convinced that `simplify_full()` should be "only
 the best" simplifications.  One of the distinct advantages of that
 function is that it did pretty much everything you wanted.  If we keep on
 changing what you need to do for various simplifications, it will become
 quite annoying to use Sage for such things in the classroom.  (Not to
 mention making various books immediately invalid.)

 [[BR]]
 I don't like removing them, but I do think we should try to avoid answers
 that are clearly wrong under the "simplify" name, like the example in the
 ticket description. We just don't have a lot of good simplifications
 available that work for complex variables. I did add `simplify_rectform()`
 to `simplify_full()` in this ticket as compensation.

 In any case, this is a much smaller change than it might seem. I mention
 in the commit messages that the 'one' algorithm was passed to
 `simplify_log()` via `simplify_full()`, which means that `log(x) + log(y)`
 would be contracted to `log(x*y)` but `2*log(x) + log(y)` wouldn't. Why
 that choice was made we'll never know, but the result is that the bug was
 pretty rare. A useful simplification was also exceedingly rare.

 I think the change only affected two doctests (including the German one),
 and in those cases it's not clear that the variables were supposed to be
 real, so the answers may be wrong anyway =)

 With `simplify_log()` moved into `simplify_real()`, I've made it use the
 default algorithm. So now `2*log(x) + log(y)` will be simplified to
 `log(x^2*y)` as well. That makes this particular simplification much more
 useful to people who use it. Before you would have had to dig into the
 `simplify_full()` and `simplify_log()` source to figure out a) why you
 weren't getting it, and, b) how to make it happen (with a separate call to
 `simplify_log()`).

 So tl;dr I felt bad removing two things from `simplify_full()` in a row
 but this one nobody will notice. And I added one back!

--
Ticket URL: <http://trac.sagemath.org/ticket/17556#comment:5>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" 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/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to