Skip to content

Commit 840a83e

Browse files
committed
delete redundant methods of functions >, >=
It is not intended for a package to ever add methods to the functions `>` or `>=`.
1 parent bdf1855 commit 840a83e

File tree

1 file changed

+0
-58
lines changed

1 file changed

+0
-58
lines changed

src/type/compare.jl

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,9 @@ end
1414
@inline function (<)(x::DoubleFloat{T}, y::DoubleFloat{T}) where {T<:IEEEFloat}
1515
return (HI(x) < HI(y)) || (HI(x) === HI(y) && LO(x) < LO(y))
1616
end
17-
@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))
19-
end
2017
@inline function (<=)(x::DoubleFloat{T}, y::DoubleFloat{T}) where {T<:IEEEFloat}
2118
return (HI(x) < HI(y)) || (HI(x) === HI(y) && LO(x) <= LO(y))
2219
end
23-
@inline function (>=)(x::DoubleFloat{T}, y::DoubleFloat{T}) where {T<:IEEEFloat}
24-
return (HI(x) > HI(y)) || (HI(x) === HI(y) && LO(x) >= LO(y))
25-
end
2620

2721
@inline function isequal(x::DoubleFloat{T}, y::DoubleFloat{T}) where {T<:IEEEFloat}
2822
return x == y || (isnan(x) && isnan(y))
@@ -51,24 +45,12 @@ end
5145
@inline function (<)(x::F, y::DoubleFloat{T}) where {T<:IEEEFloat, F<:AbstractFloat}
5246
return (<)(DoubleFloat{T}(x), y)
5347
end
54-
@inline function (>)(x::DoubleFloat{T}, y::F) where {T<:IEEEFloat, F<:AbstractFloat}
55-
return (>)(x, DoubleFloat{T}(y))
56-
end
57-
@inline function (>)(x::F, y::DoubleFloat{T}) where {T<:IEEEFloat, F<:AbstractFloat}
58-
return (>)(DoubleFloat{T}(x), y)
59-
end
6048
@inline function (<=)(x::DoubleFloat{T}, y::F) where {T<:IEEEFloat, F<:AbstractFloat}
6149
return (<=)(x, DoubleFloat{T}(y))
6250
end
6351
@inline function (<=)(x::F, y::DoubleFloat{T}) where {T<:IEEEFloat, F<:AbstractFloat}
6452
return (<=)(DoubleFloat{T}(x), y)
6553
end
66-
@inline function (>=)(x::DoubleFloat{T}, y::F) where {T<:IEEEFloat, F<:AbstractFloat}
67-
return (>=)(x, DoubleFloat{T}(y))
68-
end
69-
@inline function (>=)(x::F, y::DoubleFloat{T}) where {T<:IEEEFloat, F<:AbstractFloat}
70-
return (>=)(DoubleFloat{T}(x), y)
71-
end
7254

7355
@inline function isequal(x::DoubleFloat{T}, y::F) where {T<:IEEEFloat, F<:AbstractFloat}
7456
return isequal(x, DoubleFloat{T}(y))
@@ -104,24 +86,12 @@ end
10486
@inline function (<)(x::Integer, y::DoubleFloat{T}) where {T<:IEEEFloat}
10587
return (<)(DoubleFloat{T}(x), y)
10688
end
107-
@inline function (>)(x::DoubleFloat{T}, y::Integer) where {T<:IEEEFloat}
108-
return (>)(x, DoubleFloat{T}(y))
109-
end
110-
@inline function (>)(x::Integer, y::DoubleFloat{T}) where {T<:IEEEFloat}
111-
return (>)(DoubleFloat{T}(x), y)
112-
end
11389
@inline function (<=)(x::DoubleFloat{T}, y::Integer) where {T<:IEEEFloat}
11490
return (<=)(x, DoubleFloat{T}(y))
11591
end
11692
@inline function (<=)(x::Integer, y::DoubleFloat{T}) where {T<:IEEEFloat}
11793
return (<=)(DoubleFloat{T}(x), y)
11894
end
119-
@inline function (>=)(x::DoubleFloat{T}, y::Integer) where {T<:IEEEFloat}
120-
return (>=)(x, DoubleFloat{T}(y))
121-
end
122-
@inline function (>=)(x::Integer, y::DoubleFloat{T}) where {T<:IEEEFloat}
123-
return (>=)(DoubleFloat{T}(x), y)
124-
end
12595

12696
@inline function isequal(x::DoubleFloat{T}, y::Integer) where {T<:IEEEFloat}
12797
return isequal(x, DoubleFloat{T}(y))
@@ -152,15 +122,9 @@ end
152122
@inline function (<)(x::DoubleFloat{T}, y::Tuple{T,T}) where {T<:IEEEFloat}
153123
return (HI(x) < HI(y)) || (HI(x) === HI(y) && LO(x) < LO(y))
154124
end
155-
@inline function (>)(x::DoubleFloat{T}, y::Tuple{T,T}) where {T<:IEEEFloat}
156-
return (HI(x) > HI(y)) || (HI(x) === HI(y) && LO(x) > LO(y))
157-
end
158125
@inline function (<=)(x::DoubleFloat{T}, y::Tuple{T,T}) where {T<:IEEEFloat}
159126
return (HI(x) < HI(y)) || (HI(x) === HI(y) && LO(x) <= LO(y))
160127
end
161-
@inline function (>=)(x::DoubleFloat{T}, y::Tuple{T,T}) where {T<:IEEEFloat}
162-
return (HI(x) > HI(y)) || (HI(x) === HI(y) && LO(x) >= LO(y))
163-
end
164128

165129
@inline function isequal(x::DoubleFloat{T}, y::Tuple{T,T}) where {T<:IEEEFloat}
166130
return x == y
@@ -178,15 +142,9 @@ end
178142
@inline function (<)(x::Tuple{T,T}, y::DoubleFloat{T}) where {T<:IEEEFloat}
179143
return (HI(x) < HI(y)) || (HI(x) === HI(y) && LO(x) < LO(y))
180144
end
181-
@inline function (>)(x::Tuple{T,T}, y::DoubleFloat{T}) where {T<:IEEEFloat}
182-
return (HI(x) > HI(y)) || (HI(x) === HI(y) && LO(x) > LO(y))
183-
end
184145
@inline function (<=)(x::Tuple{T,T}, y::DoubleFloat{T}) where {T<:IEEEFloat}
185146
return (HI(x) < HI(y)) || (HI(x) === HI(y) && LO(x) <= LO(y))
186147
end
187-
@inline function (>=)(x::Tuple{T,T}, y::DoubleFloat{T}) where {T<:IEEEFloat}
188-
return (HI(x) > HI(y)) || (HI(x) === HI(y) && LO(x) >= LO(y))
189-
end
190148

191149
@inline function isequal(x::Tuple{T,T}, y::DoubleFloat{T}) where {T<:IEEEFloat}
192150
return x == y
@@ -208,18 +166,10 @@ end
208166
yy = DoubleFloat{T}(numerator(y)) / denominator(y)
209167
return x < yy
210168
end
211-
@inline function (>)(x::DoubleFloat{T}, y::Rational) where {T<:IEEEFloat}
212-
yy = DoubleFloat{T}(numerator(y)) / denominator(y)
213-
return x > yy
214-
end
215169
@inline function (<=)(x::DoubleFloat{T}, y::Rational) where {T<:IEEEFloat}
216170
yy = DoubleFloat{T}(numerator(y)) / denominator(y)
217171
return x <= yy
218172
end
219-
@inline function (>=)(x::DoubleFloat{T}, y::Rational) where {T<:IEEEFloat}
220-
yy = DoubleFloat{T}(numerator(y)) / denominator(y)
221-
return x >= yy
222-
end
223173

224174
@inline function isequal(x::DoubleFloat{T}, y::Rational) where {T<:IEEEFloat}
225175
yy = DoubleFloat{T}(numerator(y)) / denominator(y)
@@ -244,18 +194,10 @@ end
244194
xx = DoubleFloat{T}(numerator(x)) / denominator(x)
245195
return xx < y
246196
end
247-
@inline function (>)(x::Rational, y::DoubleFloat{T}) where {T<:IEEEFloat}
248-
xx = DoubleFloat{T}(numerator(x)) / denominator(x)
249-
return xx > y
250-
end
251197
@inline function (<=)(x::Rational, y::DoubleFloat{T}) where {T<:IEEEFloat}
252198
xx = DoubleFloat{T}(numerator(x)) / denominator(x)
253199
return xx <= y
254200
end
255-
@inline function (>=)(x::Rational, y::DoubleFloat{T}) where {T<:IEEEFloat}
256-
xx = DoubleFloat{T}(numerator(x)) / denominator(x)
257-
return xx >= y
258-
end
259201

260202
@inline function isequal(x::Rational, y::DoubleFloat{T}) where {T<:IEEEFloat}
261203
xx = DoubleFloat{T}(numerator(x)) / denominator(x)

0 commit comments

Comments
 (0)