Skip to content

Commit 3f16b17

Browse files
sostockinkydragon
authored andcommitted
Extend Base.rationalize instead of defining new function Base.MathConstants.rationalize
1 parent 5d72906 commit 3f16b17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/mathconstants.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ end
2929
Base.@assume_effects :foldable function (::Type{T})(x::_KnownIrrational, r::RoundingMode) where {T<:Union{Float32,Float64}}
3030
Base._irrational_to_float(T, x, r)
3131
end
32-
Base.@assume_effects :foldable function rationalize(::Type{T}, x::_KnownIrrational; tol::Real=0) where {T<:Integer}
32+
Base.@assume_effects :foldable function Base.rationalize(::Type{T}, x::_KnownIrrational; tol::Real=0) where {T<:Integer}
3333
Base._rationalize_irrational(T, x, tol)
3434
end
3535
Base.@assume_effects :foldable function Base.lessrational(rx::Rational, x::_KnownIrrational)

0 commit comments

Comments
 (0)