-
-
Notifications
You must be signed in to change notification settings - Fork 517
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
make find_minimum_on_interval use _fast_float_ #3955
Comments
comment:2
fast_float doesn't look like a win here in 3.1.2.alpha2, at least not in the cases I tried
|
comment:3
I guess what is going on is that the time to compile the function to fast_float form swamps the time to find the minimum, at least in these cases.
|
comment:4
I notice that fast_float was sneaked into find_root in the first patch at #2703, which was nominally a doctest coverage patch. It doesn't look like any kind of benchmarking was done there. |
comment:5
Oops, it was #2073. |
comment:6
See #3622 for a discussion of timings with fast_float. Based on that discussion, this probably is worth doing. |
comment:7
It seems that both forms of find_minimum_on_interval use fast_float now (sage/symbolic/expression.pyx:8398 and sage/numerical/optimize.py:181) but only one form of find_maximum_on_interval does, i.e. the f.find_maximum_on_interval(a,b) (sage/symbolic/expression.pyx:8339). find_maximum_on_interval(f, a, b) does not. I'm testing a patch for this and will be uploading it in a short while. |
comment:9
I'll be happy to review this if it is rebased on top of #2607. It would be great also if you approve my last changes on that ticket which were implementing your suggestion of dropping "_on_interval". |
This comment has been minimized.
This comment has been minimized.
comment:10
Due to number of inevitable changes in #2607 and fact, that's it is ready for review with reviewers comments fixed, I already rebased this patch on top of it and added it to dependencies. This patch also looks cleaner on top of it. |
Dependencies: #2607 |
comment:11
Please fill in your real name as Author. |
comment:12
Ah, forgot about that. Thanks for reminder, done now. |
Author: Andrzej Giniewicz |
Attachment: trac3955-find_local_maximum-ff.2.patch.gz rebased on v5.4 |
comment:13
This should just be applied. I rebased it on 5.4. Setting to positive-review. |
Reviewer: Timo Kluck |
comment:14
Why the milestone change? |
comment:15
Is anyone working with very large numbers, or is there any doctest which checks for very large numbers? Because this patch might affect the result. See #13559. Patchbot: apply trac3955-find_local_maximum-ff.2.patch |
comment:16
jdemeyer: sorry about the milestone change, I didn't realize 5.5 was already in the RC stage. ppurka: if I understand it correctly, all the other Of course, you still have a point. Especially since before, you could always manually pass a Maybe there should be something like a safe version of fast float, that checks its results for I think that this patch should still be applied for consistency. Maybe such a safe version of |
comment:17
Ok. If it is improving consistency, then let it be. The bug in #13559 is less about safety and more about allowing |
This comment has been minimized.
This comment has been minimized.
comment:19
In the future, make sure the "apply" instructions in the ticket description remain up-to-date. |
Merged: sage-5.6.beta2 |
Apply:
Depends on #2607
Component: calculus
Author: Andrzej Giniewicz
Reviewer: Timo Kluck
Merged: sage-5.6.beta2
Issue created by migration from https://trac.sagemath.org/ticket/3955
The text was updated successfully, but these errors were encountered: