#12780: Be more careful about setting the Maxima 'domain'
------------------------------------+---------------------------------------
Reporter: mjo | Owner: burcin
Type: enhancement | Status: closed
Priority: major | Milestone: sage-5.6
Component: symbolics | Resolution: fixed
Keywords: | Work issues:
Report Upstream: N/A | Reviewers: Burcin Erocal
Authors: Michael Orlitzky | Merged in: sage-5.6.beta0
Dependencies: #12845 | Stopgaps:
------------------------------------+---------------------------------------
Comment (by mjo):
Prior to this patch, `simplify_radical()` was doing two unrelated things:
1. Setting the maxima simplification domain to 'real'.
2. Calling radcan().
There was one doctest within sage that incorrectly relied on this, #12845.
You can see that I fixed it by making the assumption explicit. It looks
like the example in #14305 is doing the same thing. If you expect,
{{{
sage: sqrt(x^2).simplify_radical()
abs(x)
}}}
then you're relying on the implicit conversion to `domain:real;` which
this ticket changed. You have no reason to expect `sqrt(x^2) == abs(x)`
unless you assume that `x` is real, and we don't. The simplification
domain in sage has always been 'complex', except where these sneaky
functions twiddled it behind your back. Without the assumption that we're
dealing with real numbers, `sqrt(x^2)` should simply be left alone. As
noted above, you can't "simplify" it without screwing something up.
The real problem in #14305 is that without said assumption, `radcan()`
will do something ridiculous. That's what `radcan()` does. '''If you want
correct answers, don't use `radcan()`'''. The `radcan()` function does
something very specific, and it works as documented. What it doesn't do is
"simplification," and it has no business in sage under the name
`simplify_foo()`. Please help me kill it: #12737.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12780#comment:19>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.