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
Bug in integrating x*cos(x^3) #12947
Comments
comment:1
To compare the "right" answer, do
Note how they don't really look quite similar, not really a branch cut thing? Also, in Maxima
|
comment:2
Robert Dodier of Maxima suggests the following later in the thread.
But this doesn't resolve the original issue.
|
comment:3
Robert points out that in 5.27.0 this is at least a little better, though we still need to change domain.
|
comment:4
But since we already use |
Upstream: Fixed upstream, in a later stable release. |
comment:5
See my last comment on #11238 for why we can't have nice things. That's the only real issue with maxima-5.27. Some messages are getting mangled e.g. when maxima asks us for more information, but they aren't substantial regressions. |
comment:9
This seems to have been fixed some time ago; it works correctly in both Sage 5.13 and 6.2.
|
Changed upstream from Fixed upstream, in a later stable release. to none |
Work Issues: add doctest |
Changed work issues from add doctest to none |
Branch: u/pbruin/12947-maxima_integral |
Author: Peter Bruin |
Commit: |
comment:11
Funny I get:
Please set positive when you think this is resolved. |
Reviewer: Ralf Stephan |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:13
On the system I tested this on (GNU/Linux x86_64) this gives the expected answer, both with and without the Maxima upgrade of #13973. I just checked on ARM; the first time I got the same answer as you, but then I merged this branch (did not even rebuild) and only got the expected answer from then on. I added |
comment:14
I would argue that the complex bit means that we are not quite ready to merge this if it happens on some platforms. The question is whether this is a Maxima bug or a Sage/Pynac simplification bug. |
comment:15
Would you equally mind if there is a real digit wrong in the 17-th place? Regardless, it's fine on AMD now. |
comment:16
There are 60(!) lines in the sage code with |
comment:17
The complex bit apparently comes from applying Pynac's
(This is on ARM; the imaginary part does not appear on x86_64.) There are known precision problems in the incomplete Gamma function, so this may be related to #7099, although we only want the default 53 bits of precision here. |
comment:18
The presence of the imaginary part does not depend on #7099. At least on ARM it is essentially random (maybe it depends on FPU rounding flags or something similar):
|
comment:19
Haha! No, but as I said sometimes the complex bit indicates a different kind of problem, or has in the past. Given Peter's experiment in comment:18, though, I guess we can make that a different ticket. |
comment:20
The imaginary part turns out to be "simply" the fact that floating-point addition is not associative, and for some reason the terms in the expression
This gives 14 different outcomes depending on the summation order (some of the differences are hidden due to the number of digits printed). I don't think this can be solved easily, so I propose we stick to the |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:22
As already said ... |
comment:23
The
and on a different machine
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:26
This should solve it; probably no reason to ask for another review. |
Changed branch from u/pbruin/12947-maxima_integral to |
From this sage-support thread:
Given
this is probably something where Maxima is returning too many imaginary things and something isn't cancelling right either there or in Sage proper? We've had trouble with either side of this with incomplete gamma functions before.
CC: @orlitzky
Component: calculus
Author: Peter Bruin
Branch/Commit:
72706eb
Reviewer: Ralf Stephan
Issue created by migration from https://trac.sagemath.org/ticket/12947
The text was updated successfully, but these errors were encountered: