JuliaDiff / DualNumbers.jl

Julia package for representing dual numbers and for performing dual algebra
Other
80 stars 30 forks source link

isless broken for mixed types #72

Closed dlfivefifty closed 5 years ago

dlfivefifty commented 5 years ago
julia> dual(1) < dual(2.0)
ERROR: MethodError: no method matching isless(::Dual{Int64}, ::Dual{Float64})
Closest candidates are:
  isless(::Missing, ::Any) at missing.jl:66
  isless(::InfiniteArrays.OrientedInfinity{Bool}, ::Number) at /Users/sheehanolver/.julia/packages/InfiniteArrays/Z4yap/src/Infinity.jl:145
  isless(::Dual{T<:Real}, ::Dual{T<:Real}) where T<:Real at /Users/sheehanolver/.julia/packages/DualNumbers/QeItX/src/dual.jl:174
  ...
Stacktrace:
 [1] <(::Dual{Int64}, ::Dual{Float64}) at ./operators.jl:260
 [2] top-level scope at none:0

julia> dual(1.0) < dual(2.0)
true