Skip to content

test: fix the random failures of test_SS.jl:211 - #365

Merged
rveltz merged 1 commit into
bifurcationkit:masterfrom
ParadaCarleton:ss-fd-tolerance
Oct 29, 2026
Merged

rveltz merged 1 commit into
bifurcationkit:masterfrom
ParadaCarleton:ss-fd-tolerance

Conversation

@ParadaCarleton

Copy link
Copy Markdown
Contributor

test_SS.jl:211 compares a forward difference with δ = 1e-6 to ForwardDiff at atol = 1e-5, but the truncation error δ f''/2 depends on the random ci and dci (a failing run was off by 5.5e-5, so f'' was about 110). The tolerance is now that error bound, δ|f''|/2 + δ²|f'''| + 4 eps |f| / δ with a factor 2, with f'' and f''' from nested ForwardDiff. The change is in the test only.

https://claude.ai/code/session_015sE9Latuiqsp6zSHQ1cshz

…ion error

The error of a forward difference with step δ depends on the random ci and dci,
so a fixed atol = 1e-5 failed at random. The tolerance is now the error bound
from nested ForwardDiff second and third derivatives.

Claude-Session: https://claude.ai/code/session_01BEoUbvf41HZqywHoqybG7q
@rveltz
rveltz merged commit 239a819 into bifurcationkit:master Oct 29, 2026
2 of 4 checks passed
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.

2 participants