-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
invalid simplification of complex logarithm #12322
Comments
This comment has been minimized.
This comment has been minimized.
comment:2
Well, simplification is just that - simplification. You could investigate each of the various parts of |
comment:3
Replying to @kcrisman: The simplification should always be equivalent to the original expression, though, or it isn't a simplification, it's a truncation (or something else). It doesn't make much sense to have a I did check simplify_log() back when this was reported, and that wasn't the culprit. I dug a little deeper and found that it's
That, at least, doesn't make any mention of invalid simplifications. |
comment:4
Ah, radcan. Our favorite problem in Sage simplification - see #8497 for the last time this became a brouhaha. See #11912 for the followup to that, and #11668 for why this probably is happening (temporarily going to reals for the domain), and #3520 for yet another example. Basically, we have a difference of opinion between some users and Maxima as to what a simplification is. Is it a simplification of symbolic expressions which may be multivalued, or a simplification of functions? Good luck finding a resolution; I have no good ideas on these issues right now, having wrestled with the other tickets in vain. I think it would be unfortunate to remove |
comment:5
I'm of the opinion that a How do I as a user know whether or not I can trust the result? Can I trust the results for e.g. publication (or even homework)? Or should I treat them like Anyway, thanks for finding those other tickets for me. I'm ranting in general and not at you =) I'll read through them all when I have some free time and coffee. Maybe there's a way to make everyone happy. |
comment:6
Hee hee :) Again, the real problem is that we are trying to treat "expressions" as "functions", I think. You should feel free to create a Maxima-only example and ask their list; I'd be intrigued to see what they say. Again, I have not looked into this closely; it could be an actual bug. |
Upstream: Reported upstream. Little or no feedback. |
comment:7
I reported this upstream at, https://sourceforge.net/tracker/?func=detail&aid=3476031&group_id=4933&atid=104933 |
Doctest the fix from #12737. |
comment:8
Attachment: sage-trac_12322.patch.gz This is undoubtedly what the doctest will look like, but it probably doesn't make much sense to review this until #12737 is finished. |
Author: Michael Orlitzky |
Dependencies: #12737 |
Changed upstream from Reported upstream. Little or no feedback. to Reported upstream. No feedback yet. |
comment:10
This probably needs an update about the word 'unsafe', that having left #12737. Trivial to change. I've also inquired again about the upstream, in case this ends up being orthogonal. |
This comment has been minimized.
This comment has been minimized.
comment:13
I must have missed this in the great trac email blackout. I'll try to figure out the git workflow and update the patch. |
Branch: u/mjo/ticket/12322 |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Commit: |
This comment has been minimized.
This comment has been minimized.
comment:20
Needs to be rebased. |
Branch pushed to git repo; I updated commit sha1. This was a forced push. Recent commits:
|
comment:22
Replying to @sagetrac-git:
Nice, git will let me be bad. Since this is a trivial patch, I rebased (that's |
comment:23
I'd remove the call to |
comment:24
The symbolic domain situation is pretty muddy. We want variables to be complex by default, and we set the Maxima "domain" to complex for each new symbolic variable. But, that isn't always enough to affect simplifications. Some parts of Maxima use the "domain", others use assumptions, some use neither, and I'll bet one or two use both. The complex assumption in the test case wasn't strictly necessary to make it fail, but it highlights the fact that this is a bug only when |
Reviewer: Marc Mezzarobba |
comment:25
Replying to @orlitzky:
Sure; I am only a bit concerned that having the assumption in the test gives the impression that the variable is real by default. But it's no big deal. |
* develop: (101 commits) Updated Sage version to 6.1.beta2 fix latex fix documentation minor typography Trac 13101: mark doctest as "long time" trac 13101 better doctest Trac 13101: Fix bug in enumerate_totallyreal_fields_all sagemath#9706: review patch. trac 9706: Propose new class structure Symbolic Chebyshev polynomials: reviewer patch trac 9706: Collective patch. Bugfixes, extensions, optimizations, documentation, doctests for chebyshev_T, chebyshev_U and base class for ortho polys Fixing Whitespace errors Use bash as SHELL for build/Makefile allow numpy arrays in list_plot, line, points Trac sagemath#12322: Add a doctest for the correct behavior introduced in trac sagemath#12737. Trac sagemath#14186 coerce_binop errors with keyword arguments trac sagemath#15553: Broken links in the doc of graph/ and numerical/ Improve handling of make targets sage, csage, extcode, scripts Reorded all.py to match original (so fewer changes). Fixed minor typo in cobminat/crystals/letters.pyx. ...
As pointed out by J.H. Davenport in this sage-support thread,
http://groups.google.com/group/sage-support/browse_thread/thread/f9d2209041775c3e
the following (invalid) log simplification is made:
When, for example, t=-1,
The assumption that
t
is complex is not necessary here, but simplify should definitely not ignore the imaginary part when dealing with complex functions.Depends on #12737
Upstream: Reported upstream. No feedback yet.
Component: symbolics
Author: Michael Orlitzky
Branch/Commit: u/mjo/ticket/12322 @
55eb0aa
Reviewer: Marc Mezzarobba
Issue created by migration from https://trac.sagemath.org/ticket/12322
The text was updated successfully, but these errors were encountered: