Skip to content

Commit 2fed58d

Browse files
committed
newton_impl(): use isapprox()
1 parent e5e10ef commit 2fed58d

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
@@ -53,7 +53,7 @@ function newton_impl(Δ, xs::T=mode(d), tol::Real=1e-12) where {T}
5353
x = xs - Δ(xs)
5454
@assert typeof(x) === T
5555
x0 = T(xs)
56-
while abs(x-x0) > max(abs(x),abs(x0)) * tol
56+
while !isapprox(x, x0, atol=0, rtol=tol)
5757
x0 = x
5858
x = x0 - Δ(x0)
5959
end

0 commit comments

Comments
 (0)