diff --git a/base/float.jl b/base/float.jl index d4b0b97af19d45..b6344ddaf9c7c2 100644 --- a/base/float.jl +++ b/base/float.jl @@ -503,15 +503,18 @@ for Ti in (Int64,UInt64,Int128,UInt128) end end end +for op in (:(==), :<, :<=) + @eval begin + ($op)(x::Float16, y::Union{Int128,UInt128,Int64,UInt64}) = ($op)(Float64(x), Float64(y)) + ($op)(x::Union{Int128,UInt128,Int64,UInt64}, y::Float16) = ($op)(Float64(x), Float64(y)) -==(x::Float32, y::Union{Int32,UInt32}) = Float64(x)==Float64(y) -==(x::Union{Int32,UInt32}, y::Float32) = Float64(x)==Float64(y) - -<(x::Float32, y::Union{Int32,UInt32}) = Float64(x)= 1)