Skip to content

BackTracking: skip a NaN interpolated step instead of taking it - #116

Open
ParadaCarleton wants to merge 1 commit into
SciML:mainfrom
ParadaCarleton:backtracking-nan-step
Open

ParadaCarleton wants to merge 1 commit into
SciML:mainfrom
ParadaCarleton:backtracking-nan-step

Conversation

@ParadaCarleton

Copy link
Copy Markdown

In Float32, once the trial steps shrink to about 1e-9, inv(α₁^2 * α₂^2 * (α₂ - α₁)) overflows to Inf and the cubic minimizer becomes NaN. Base min and max propagate it, so α₂ turns NaN and the search returns a NaN step, which makes the caller's next iterate all-NaN. LineSearches.jl clamps with NaNMath.min/NaNMath.max, which drop the NaN; this change does the same by shrinking by ρ_hi when the interpolated step is NaN. The new test backtracks a Float32 residual that jumps up at every positive step and checks the step stays finite; it fails without the fix.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant