# Strange behaviour of find\_zero() from Roots.jl

**URL:** <https://discourse.julialang.org/t/strange-behaviour-of-find-zero-from-roots-jl/31304>\
**Category:** General Usage\
**Created:** [November 20, 2019, 8:49am UTC](https://discourse.julialang.org/t/strange-behaviour-of-find-zero-from-roots-jl/31304 "2019-11-20T08:49:39Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [November 20, 2019, 9:31am UTC](https://discourse.julialang.org/t/strange-behaviour-of-find-zero-from-roots-jl/31304/4 "2019-11-20T09:31:31Z")

</div>

Bisection is really simple to implement. Eg

> [@Is there a faster bisection root solver (that uses atol)?](https://discourse.julialang.org/t/is-there-a-faster-bisection-root-solver-that-uses-atol/12658/15):
>
> This should be type stable (but didn’t test it thoroughly): using Statistics: middle """ bisection(f, a, b; fa = f(a), fb = f(b), ftol, wtol) Bisection algorithm for finding the root ``f(x) ≈ 0`` within the initial bracket `[a,b]`. Returns a named tuple `(x = x, fx = f(x), isroot = ::Bool, iter = ::Int, ismaxiter = ::Bool)`. Terminates when either 1. `abs(f(x)) \< ftol` (`isroot = true`), 2. the width of the bracket is `≤wtol` (`isroot = false`), 3. `maxiter` number of iterations is re…

---

_[View the full topic](https://discourse.julialang.org/t/strange-behaviour-of-find-zero-from-roots-jl/31304)._
