Skip to content

Commit

Permalink
Close issue #188 (#189)
Browse files Browse the repository at this point in the history
* rm duplicate link

* fix bug in A42 method; close issue #188
  • Loading branch information
jverzani committed Jul 6, 2020
1 parent bb11bf7 commit 183193b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
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 = "1.0.2"
version = "1.0.3"

[deps]
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
Linux: [![Build Status](https://travis-ci.org/JuliaMath/Roots.jl.svg?branch=master)](https://travis-ci.org/JuliaMath/Roots.jl)
Windows: [![Build status](https://ci.appveyor.com/api/projects/status/goteuptn5kypafyl?svg=true)](https://ci.appveyor.com/project/jverzani/roots-jl)

https://juliahub.com/docs/Roots/
Documentation

# Root finding functions for Julia


Expand Down
2 changes: 1 addition & 1 deletion src/bracketing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ function update_state(M::A42, f, state::UnivariateZeroState{T,S}, options::Univa
if abs(cb - u) > 0.5 * (b-a)
ch = _middle(an, bn)
end
fch::S = f(cb)
fch::S = f(ch)
incfn(state)
if check_zero(M, state, ch, fch)
# tighten up bracket
Expand Down
6 changes: 6 additions & 0 deletions test/test_find_zero.jl
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,12 @@ end

## issue #178 passinig through method
@test fzero(sin, 3, 4, Roots.Brent()) π

## issue #188 with A42
f(x) = x*(1-x^2)/((x^2+a^2)*(1+a^2*x^2))
a,r = .18, 0.05
xs = (r + 1e-12, 1.0)
@test find_zero(x -> f(r)-f(x), xs, Roots.A42()) 0.4715797678171889
end


Expand Down

2 comments on commit 183193b

@jverzani
Copy link
Member Author

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/17547

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 v1.0.3 -m "<description of version>" 183193b251ee26af6a0575cfe34b53e57549b9e0
git push origin v1.0.3

Please sign in to comment.