JuliaMath / JuliaMath/Roots.jl
Repetitive solving
- 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.