Skip to content

Commit

Permalink
Update bisection.py docs
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-kidger authored Aug 22, 2024
1 parent 1de4264 commit b709f61
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions optimistix/_solver/bisection.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ class Bisection(AbstractRootFinder[Scalar, Scalar, Aux, _BisectionState], strict
whichever half contains the root. This is then repeated. The iteration stops once
the interval is sufficiently small.
If expand_if_necessary and detect are true, the initial interval will be expanded
if it doesn't contain the the root. This expansion assumes that the function is
monotonic.
If `expand_if_necessary` and `detect` are true, the initial interval will be
expanded if it doesn't contain the the root. This expansion assumes that the
function is monotonic.
"""

rtol: float
Expand Down Expand Up @@ -221,4 +221,8 @@ def postprocess(
- `True`: specify that `fn(lower, args) > 0 > fn(upper, args)`.
- `"detect"`: automatically check `fn(lower, args)` and `fn(upper, args)`. Note that
this option may increase both runtime and compilation time.
- `expand_if_necessary`: If `True` then the `lower` and `upper` passed as options will
be made larger or smaller if the root is not found within the interval
`[lower, upper]`. To locate the root correctly then this assumes that the function
is monotonic.
"""

0 comments on commit b709f61

Please sign in to comment.