Skip to content

Commit 8399224

Browse files
committed
newton_impl(): use isapprox()
1 parent 4d021a7 commit 8399224

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/quantilealgs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function newton_impl(Δ, xs::T=mode(d), tol::Real=1e-12) where {T}
5151
x = xs - Δ(xs)
5252
@assert typeof(x) === T
5353
x0 = T(xs)
54-
while abs(x-x0) > max(abs(x),abs(x0)) * tol
54+
while !isapprox(x, x0, atol=0, rtol=tol)
5555
x0 = x
5656
x = x0 - Δ(x0)
5757
end

0 commit comments

Comments
 (0)