Skip to content

Commit 54e7de5

Browse files
Merge pull request #223 from JuliaMath/compare2
Fix comparison 0.0 -0.0 (Tim Holy)
2 parents 172c17e + 6087e71 commit 54e7de5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/type/compare.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ end
1212
return (LO(x) !== LO(y)) || (HI(x) !== HI(y) || posnegzeros(HI(x),HI(y)))
1313
end
1414
@inline function (<)(x::DoubleFloat{T}, y::DoubleFloat{T}) where {T<:IEEEFloat}
15-
return (HI(x) < HI(y)) || (HI(x) === HI(y) && LO(x) < LO(y))
15+
return (HI(x) < HI(y)) || (HI(x) == HI(y) && LO(x) < LO(y))
1616
end
1717
@inline function (<=)(x::DoubleFloat{T}, y::DoubleFloat{T}) where {T<:IEEEFloat}
18-
return (HI(x) < HI(y)) || (HI(x) === HI(y) && LO(x) <= LO(y))
18+
return (HI(x) < HI(y)) || (HI(x) == HI(y) && LO(x) <= LO(y))
1919
end
2020

2121
@inline function isequal(x::DoubleFloat{T}, y::DoubleFloat{T}) where {T<:IEEEFloat}

0 commit comments

Comments
 (0)