DoubleDouble.jl
DoubleDouble.jl copied to clipboard
ERROR: <= not defined for DoubleDouble.Double{Float64}
I thought <=
might have been inferred from <
and ==
but apparently, that's not the case:
julia> a = Double(1.0);
julia> b = Double(2);
julia> a < b
true
julia> a == b
false
julia> a ≤ b
ERROR: <= not defined for DoubleDouble.Double{Float64}
Stacktrace:
[1] <=(::DoubleDouble.Double{Float64}, ::DoubleDouble.Double{Float64}) at ./promotion.jl:351
It seems to be a matter of
julia> import Base.≤
julia> ≤{T}(x::Double{T}, y::Double{T}) = x < y || x == y
<= (generic function with 58 methods)