Skip to content

Commit 2b0e173

Browse files
committed
use Base._precision_with_base_2 instead of Base._precision if defined
1 parent ac1ef07 commit 2b0e173

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Double.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ DoubleFloat(x::Int64) = Double64(x, zero(Int64))
213213
DoubleFloat(x::Int32) = Double32(x, zero(Int32))
214214
DoubleFloat(x::Int16) = Double16(x, zero(Int16))
215215

216-
# overload Base._precision to support the base keyword in Julia 1.8
217-
let precision = isdefined(Base, :_precision) ? :_precision : :precision
216+
# overload Base._precision_with_base_2 or Base._precision to support the base keyword in Julia 1.8
217+
let precision = isdefined(Base, :_precision_with_base_2) ? :_precision_with_base_2 : isdefined(Base, :_precision) ? :_precision : :precision
218218
@eval Base.$precision(::Type{DoubleFloat{T}}) where {T<:IEEEFloat} = 2*Base.$precision(T)
219219
end
220220

0 commit comments

Comments
 (0)