-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Handling Float Integrals #18434
Handling Float Integrals #18434
Conversation
✅ Hi, I am the SymPy bot (v152). I'm here to help you write a release notes entry. Please read the guide on how to write release notes. Your release notes are in good order. Here is what the release notes will look like:
This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.6. Note: This comment will be updated with the latest check if you edit the pull request. You need to reload the page to see it. Click here to see the pull request description that was parsed.
Update The release notes on the wiki have been updated. |
This would almost certainly break existing integrals that work. integrate can't always take an expression with a numeric parameter replaced with a symbolic one and still give a result. Sometimes a more general answer doesn't even exist. It would be better to fix the underlying algorithm, in this case, meijerg, to work with floating point numbers. |
But whatever, it looks like there are only a few test fixes to be done. If it does not work (because using symbols in some places like exponents make the problem more difficult), then a way of casting float to rationals and casting back can be suggested. (Though I'm not sure that it is totally a good idea.) |
@Smit-create Are you still working on it? Please resolve the conflicts and address the comments. |
Actually, I tried to fix it but still unable to find a proper fix yet. Would changing some tests work good? |
Please review. |
LGTM. |
This PR made |
I will have a look at this. |
Actually I think that this changes are starting to fail in master because of timeouts. |
If that is the case, then I suggest it to revert. As soon as, I find the other way around, I will try to fix this with as new PR. I do agree with you |
I didn’t know how much changes were done in master after this, but I see even reverting PR fails some test. If the problem is about float integrals, I think that it’s better to test out to use nsimplify and cast floats into rationals, and restore them back. |
I am thinking of a similar way to approach it. |
The above diff leads some small test failures, but makes the |
Handling Float Integrals
References to other Issues or PRs
Fixes #17119
Fixes #14431
Brief description of what is fixed or changed
Before:
After fixing:
Other comments
Release Notes