Skip to content

Commit

Permalink
don't make unrelated changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nsajko authored Jan 16, 2025
1 parent a7acbd5 commit 7539f4b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions base/irrationals.jl
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ Complex{T}(x::AbstractIrrational) where {T<:Real} = Complex{T}(T(x))
function _irrational_to_rational_at_current_precision(::Type{T}, x::AbstractIrrational) where {T <: Integer}
bx = BigFloat(x)
r = rationalize(T, bx, tol = 0)
br = BigFloat(r, precision = precision(BigFloat) + 32)
if eps(bx) < abs(br - bx)
if abs(BigFloat(r) - bx) > eps(bx)
r
else
nothing # Error is too small, repeat with greater precision.
Expand Down

0 comments on commit 7539f4b

Please sign in to comment.