Skip to content
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

add adjust_bracket; close #441 #442

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "Roots"
uuid = "f2b01f46-fcfa-551c-844a-d8ac1e96c665"
version = "2.1.7"
version = "2.1.8"

[deps]
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"
Expand Down
1 change: 1 addition & 0 deletions src/Bracketing/chandrapatlu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ end
# a = most recent, b prior
function init_state(::Chandrapatla, F, x₀, x₁, fx₀, fx₁)
a, b, fa, fb = x₁, x₀, fx₁, fx₀
assert_bracket(fa, fb)
c, fc = a, fa
ChandrapatlaState(promote(a, b, c)..., promote(fa, fb, fc)...)
end
Expand Down
4 changes: 2 additions & 2 deletions test/test_bracketing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,9 @@ end
@test avg(cnts) <= 3000

## issue 412 check for bracket
f = x -> x - 1
for M in Ms
@test_throws ArgumentError find_zero(f, (-3, 0), M)
@test_throws ArgumentError find_zero(x -> x - 1, (-3, 0), M)
@test_throws ArgumentError find_zero(x -> 1 + x^2, (10, 20), M)
end
end

Expand Down
Loading