Skip to content
This repository was archived by the owner on Dec 10, 2023. It is now read-only.

ERROR: <= not defined for DoubleDouble.Double{Float64} #27

Open
dpo opened this issue Jul 22, 2017 · 0 comments
Open

ERROR: <= not defined for DoubleDouble.Double{Float64} #27

dpo opened this issue Jul 22, 2017 · 0 comments

Comments

@dpo
Copy link

dpo commented Jul 22, 2017

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)
dpo added a commit to dpo/DoubleDouble.jl that referenced this issue Jul 22, 2017
dpo added a commit to dpo/DoubleDouble.jl that referenced this issue Aug 11, 2017
dpo added a commit to dpo/DoubleDouble.jl that referenced this issue Aug 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant