Skip to content

Commit

Permalink
Format .jl files [skip ci] (#461)
Browse files Browse the repository at this point in the history
Co-authored-by: jverzani <[email protected]>
  • Loading branch information
github-actions[bot] and jverzani authored Feb 28, 2025
1 parent 1a72f34 commit f71d588
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
7 changes: 5 additions & 2 deletions src/convergence.jl
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,11 @@ function assess_convergence(M::Any, state::AbstractUnivariateZeroState, options)
return (:not_converged, false)
end

function assess_convergence(M::AbstractBisection, state::AbstractUnivariateZeroState, options::O) where {O <: Union{ExactOptions, XExactOptions}}
function assess_convergence(
M::AbstractBisection,
state::AbstractUnivariateZeroState,
options::O,
) where {O<:Union{ExactOptions,XExactOptions}}
# return convergence_flag, boolean
# no check if f == ∞
is_exact_zero_f(M, state, options) && return (:exact_zero, true)
Expand All @@ -297,7 +301,6 @@ function assess_convergence(M::AbstractBisection, state::AbstractUnivariateZeroS
return (:not_converged, false)
end


# speeds up exact f values by just a bit (2% or so) over the above, so guess this is worth it.
function assess_convergence(
M::AbstractBracketingMethod,
Expand Down
10 changes: 5 additions & 5 deletions test/test_find_zero.jl
Original file line number Diff line number Diff line change
Expand Up @@ -589,9 +589,9 @@ end
@testset "bracketing_atol" begin
## issue $457
f(x) = x^2 - 4
@test find_zero(f, (0,Inf)) 2 # 2.0 correct
@test find_zero(f, (0,Inf), atol=1) 1.9997558593749998
@test find_zero(f, (0,Inf),atol=1e-5) 1.9999998807907102
@test find_zero(f, (0,8), atol=1) 1.99609375
@test find_zero(f, (0,8), atol=1e-3) 2.0000152587890625
@test find_zero(f, (0, Inf)) 2 # 2.0 correct
@test find_zero(f, (0, Inf), atol=1) 1.9997558593749998
@test find_zero(f, (0, Inf), atol=1e-5) 1.9999998807907102
@test find_zero(f, (0, 8), atol=1) 1.99609375
@test find_zero(f, (0, 8), atol=1e-3) 2.0000152587890625
end

2 comments on commit f71d588

@jverzani
Copy link
Member

Choose a reason for hiding this comment

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

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/126072

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v2.2.7 -m "<description of version>" f71d5880d337344cfaf9a372a37c78fc79eb8b05
git push origin v2.2.7

Also, note the warning: Version 2.2.7 skips over 2.2.6
This can be safely ignored. However, if you want to fix this you can do so. Call register() again after making the fix. This will update the Pull request.

Please sign in to comment.