JuliaMath / JuliaMath/Roots.jl

Repetitive solving

Open
#407 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
413
Forks
61
Avg merge
57m
Merged PRs (30d)
5

Description

I have a non-increasing function $f$ on $\mathbb R_+$ that starts at $f(0) =1$ and ends up at $f(Inf) = 0$. I want to compute the inverse of the function, and I am currently using the folowing code:

```julia
f_inv(y) = find_zero(x -> f(x) - y,(0,Inf))
```

Then i am repetitively calling this inversion as, e.g, :
````julia
samples = rand(1e6)
f_inv.(samples)
````

Would it be possible to reduce the cost of subsequent evaluations ? I guess that, since this is using a bisection method, we could re-start each iteration using the previous bisection. Is there something like that implemented in Roots.jl ?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.