Skip to content

MAINT: optimize.toms748: don't do newton after secant interpolation #17732

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

Merged
merged 1 commit into from
Jan 6, 2023

Conversation

mdhaber
Copy link
Contributor

@mdhaber mdhaber commented Jan 6, 2023

Reference issue

Closes gh-13535

What does this implement/fix?

This stops TOMS748 from performing newton iteration after secant interpolation as suggested in gh-13535.

The relevant excerpt from the original paper is:
image
It's not immediately obvious, but reading closely looks like they meant for the iterative procedure to execute only if $A\neq 0$; otherwise it would have been "if $A=0$, then $r_0 = ...$", but they wrote $r = ...$.

Additional information

No tests are needed; the old tests were sufficient and they still pass.

@pvanmulbregt This implements your recommendation from gh-13535. Does this close the issue?

@mdhaber mdhaber added scipy.optimize maintenance Items related to regular maintenance tasks labels Jan 6, 2023
@mdhaber mdhaber requested a review from pvanmulbregt January 6, 2023 04:52
@mdhaber mdhaber requested a review from andyfaff as a code owner January 6, 2023 04:52
Copy link
Member

@tupui tupui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right it's a bit ambiguous, there is the distinction with the two lines and r vs r0. So this PR seems right.

And all tests are passing so LGTM.

@tupui tupui merged commit 6258118 into scipy:main Jan 6, 2023
@tupui tupui added this to the 1.11.0 milestone Jan 6, 2023
windows-server-2003 pushed a commit to windows-server-2003/scipy that referenced this pull request Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Items related to regular maintenance tasks scipy.optimize
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Newton-iteration should not be done after secant interpolation
2 participants