-
-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Be more careful about setting the Maxima 'domain' #12780
Comments
comment:1
Whoops, there was one failing doctest that I missed (I got a timeout somewhere in ptestlong, I think). Anyway, the doctest was wrong: This patch could potentially help with fixing |
Same patch with the functional.py doctest removed |
Dependencies: #12845 |
comment:3
Attachment: sage-trac_12780.patch.gz I've refreshed the patch without the fixed doctest. That's now #12845. |
comment:4
I like the concept of allowing the switch. So you're sure that |
comment:5
Replying to @kcrisman:
Dr. Fateman recently (March 14) mentioned on the Maxima list that I think we can allow the switch where it makes sense. I left the With
we silently convert the expression to the reals. This isn't a result of the log simplification algorithm; it's a side effect of setting the domain to real (which provides no other tested benefits). Obviously assuming that you're working over the reals can allow some simplifications, but we should just make that available to the user rather than doing it arbitrarily in some simplification functions but not others. |
comment:6
Hmm, yeah, that seems bad. So all the "usual" results of |
comment:7
Replying to @kcrisman:
Yep, and modulo #12845, the same goes for |
comment:8
Please fill in your real name as Author. |
Author: Michael Orlitzky |
comment:10
Looks good to me. |
Reviewer: Burcin Erocal |
Merged: sage-5.6.beta0 |
comment:12
See #14305. Apparently radcan does not ignore domain after all.
This is true in the current Maxima (5.29.1) as well as the older 5.26 series in Sage 5.1/5.2. |
comment:14
I think that what happened is that this is not part of the assumption framework! There is no assuming going on here, as far as Maxima is concerned. See for instance Fateman's answer here. |
comment:15
if However if Maple 15 gives:
If this ticket did change the default domain of symbolic variables from real to complex, this is a MAJOR change. Paul |
comment:16
Again, according to symbolics experts (as opposed to functions experts) like Fateman, there is no such thing as
Which is what is given here, since one doesn't know a priori whether
Yes, that's presumably why
The default domain has been complex for a long, long time. It was just exposed here that we didn't do that in Note also that I am not advocating for a particular resolution here, just trying to summarize the arguments and previous behavior. |
comment:17
I believe when one chooses
Paul |
comment:18
Replying to @zimmermann6:
You are probably right. I would encourage you to take this up with the Maxima developers on their list, because I personally want to know whether it's even worth thinking about this, or whether mjo is really right and we should just can |
comment:19
Prior to this patch,
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,
then you're relying on the implicit conversion to The real problem in #14305 is that without said assumption, |
comment:20
Michael, ok, we will modify our book, taking into account that by default symbolic variables are considered complex. However I'm not happy with this ticket (#12780). Before we had (say in 5.1):
This was correct. And now (say in 5.8):
This is wrong, thus we have a regression with this ticket. Paul Note: I didn't call |
comment:21
Replying to @zimmermann6:
The only thing that I agree 100% that the current answer is wrong.. nothing with "simplify" in the name should convert
It's less wrong, maybe. But still wrong. In fact, the underlying call to
Now that we've fixed that bug (in this ticket), the expression |
Ultimately, we should provide the user a nice way to set this. In the meantime, I'd like to clean up a few places where we play fast and loose with it:
simplify_radical()
andsimplify_log()
set the domain to 'real' before the round trip through Maxima and back. This has no effect on any doctest (radcan ignoresdomain
anyway).Expression.expand_log() sets the domain to 'real' when it's called, and 'complex' when it returns. We should make a note of the previous value rather than assuming it is 'complex' when the method is called.
Depends on #12845
CC: @zimmermann6
Component: symbolics
Author: Michael Orlitzky
Reviewer: Burcin Erocal
Merged: sage-5.6.beta0
Issue created by migration from https://trac.sagemath.org/ticket/12780
The text was updated successfully, but these errors were encountered: