Skip to content

Commit

Permalink
newton_impl(): use isapprox()
Browse files Browse the repository at this point in the history
  • Loading branch information
LebedevRI committed Sep 13, 2024
1 parent 8e13f42 commit cf55a37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/quantilealgs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function newton_impl(Δ, xs::T=mode(d), tol::Real=1e-12) where {T}
x = xs - Δ(xs)
@assert typeof(x) === T
x0 = T(xs)
while abs(x-x0) > max(abs(x),abs(x0)) * tol
while !isapprox(x, x0, atol=0, rtol=tol)
x0 = x
x = x0 - Δ(x0)
end
Expand Down

0 comments on commit cf55a37

Please sign in to comment.