14
14
@inline function (< )(x:: DoubleFloat{T} , y:: DoubleFloat{T} ) where {T<: IEEEFloat }
15
15
return (HI (x) < HI (y)) || (HI (x) === HI (y) && LO (x) < LO (y))
16
16
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
20
17
@inline function (<= )(x:: DoubleFloat{T} , y:: DoubleFloat{T} ) where {T<: IEEEFloat }
21
18
return (HI (x) < HI (y)) || (HI (x) === HI (y) && LO (x) <= LO (y))
22
19
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
26
20
27
21
@inline function isequal (x:: DoubleFloat{T} , y:: DoubleFloat{T} ) where {T<: IEEEFloat }
28
22
return x == y || (isnan (x) && isnan (y))
38
32
@inline function (== )(x:: F , y:: DoubleFloat{T} ) where {T<: IEEEFloat , F<: AbstractFloat }
39
33
return (== )(DoubleFloat {T} (x), y)
40
34
end
41
- @inline function (!= )(x:: DoubleFloat{T} , y:: F ) where {T<: IEEEFloat , F<: AbstractFloat }
42
- return (!= )(x, DoubleFloat {T} (y))
43
- end
44
- @inline function (!= )(x:: F , y:: DoubleFloat{T} ) where {T<: IEEEFloat , F<: AbstractFloat }
45
- return (!= )(DoubleFloat {T} (x), y)
46
- end
47
35
48
36
@inline function (< )(x:: DoubleFloat{T} , y:: F ) where {T<: IEEEFloat , F<: AbstractFloat }
49
37
return (< )(x, DoubleFloat {T} (y))
50
38
end
51
39
@inline function (< )(x:: F , y:: DoubleFloat{T} ) where {T<: IEEEFloat , F<: AbstractFloat }
52
40
return (< )(DoubleFloat {T} (x), y)
53
41
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
60
42
@inline function (<= )(x:: DoubleFloat{T} , y:: F ) where {T<: IEEEFloat , F<: AbstractFloat }
61
43
return (<= )(x, DoubleFloat {T} (y))
62
44
end
63
45
@inline function (<= )(x:: F , y:: DoubleFloat{T} ) where {T<: IEEEFloat , F<: AbstractFloat }
64
46
return (<= )(DoubleFloat {T} (x), y)
65
47
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
72
48
73
49
@inline function isequal (x:: DoubleFloat{T} , y:: F ) where {T<: IEEEFloat , F<: AbstractFloat }
74
50
return isequal (x, DoubleFloat {T} (y))
91
67
@inline function (== )(x:: Integer , y:: DoubleFloat{T} ) where {T<: IEEEFloat }
92
68
return (== )(DoubleFloat {T} (x), y)
93
69
end
94
- @inline function (!= )(x:: DoubleFloat{T} , y:: Integer ) where {T<: IEEEFloat }
95
- return (!= )(x, DoubleFloat {T} (y))
96
- end
97
- @inline function (!= )(x:: Integer , y:: DoubleFloat{T} ) where {T<: IEEEFloat }
98
- return (!= )(DoubleFloat {T} (x), y)
99
- end
100
70
101
71
@inline function (< )(x:: DoubleFloat{T} , y:: Integer ) where {T<: IEEEFloat }
102
72
return (< )(x, DoubleFloat {T} (y))
103
73
end
104
74
@inline function (< )(x:: Integer , y:: DoubleFloat{T} ) where {T<: IEEEFloat }
105
75
return (< )(DoubleFloat {T} (x), y)
106
76
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
113
77
@inline function (<= )(x:: DoubleFloat{T} , y:: Integer ) where {T<: IEEEFloat }
114
78
return (<= )(x, DoubleFloat {T} (y))
115
79
end
116
80
@inline function (<= )(x:: Integer , y:: DoubleFloat{T} ) where {T<: IEEEFloat }
117
81
return (<= )(DoubleFloat {T} (x), y)
118
82
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
125
83
126
84
@inline function isequal (x:: DoubleFloat{T} , y:: Integer ) where {T<: IEEEFloat }
127
85
return isequal (x, DoubleFloat {T} (y))
152
110
@inline function (< )(x:: DoubleFloat{T} , y:: Tuple{T,T} ) where {T<: IEEEFloat }
153
111
return (HI (x) < HI (y)) || (HI (x) === HI (y) && LO (x) < LO (y))
154
112
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
158
113
@inline function (<= )(x:: DoubleFloat{T} , y:: Tuple{T,T} ) where {T<: IEEEFloat }
159
114
return (HI (x) < HI (y)) || (HI (x) === HI (y) && LO (x) <= LO (y))
160
115
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
164
116
165
117
@inline function isequal (x:: DoubleFloat{T} , y:: Tuple{T,T} ) where {T<: IEEEFloat }
166
118
return x == y
178
130
@inline function (< )(x:: Tuple{T,T} , y:: DoubleFloat{T} ) where {T<: IEEEFloat }
179
131
return (HI (x) < HI (y)) || (HI (x) === HI (y) && LO (x) < LO (y))
180
132
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
184
133
@inline function (<= )(x:: Tuple{T,T} , y:: DoubleFloat{T} ) where {T<: IEEEFloat }
185
134
return (HI (x) < HI (y)) || (HI (x) === HI (y) && LO (x) <= LO (y))
186
135
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
190
136
191
137
@inline function isequal (x:: Tuple{T,T} , y:: DoubleFloat{T} ) where {T<: IEEEFloat }
192
138
return x == y
@@ -200,26 +146,14 @@ end
200
146
yy = DoubleFloat {T} (numerator (y)) / denominator (y)
201
147
return x == yy
202
148
end
203
- @inline function (!= )(x:: DoubleFloat{T} , y:: Rational ) where {T<: IEEEFloat }
204
- yy = DoubleFloat {T} (numerator (y)) / denominator (y)
205
- return x != yy
206
- end
207
149
@inline function (< )(x:: DoubleFloat{T} , y:: Rational ) where {T<: IEEEFloat }
208
150
yy = DoubleFloat {T} (numerator (y)) / denominator (y)
209
151
return x < yy
210
152
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
215
153
@inline function (<= )(x:: DoubleFloat{T} , y:: Rational ) where {T<: IEEEFloat }
216
154
yy = DoubleFloat {T} (numerator (y)) / denominator (y)
217
155
return x <= yy
218
156
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
223
157
224
158
@inline function isequal (x:: DoubleFloat{T} , y:: Rational ) where {T<: IEEEFloat }
225
159
yy = DoubleFloat {T} (numerator (y)) / denominator (y)
@@ -236,26 +170,14 @@ end
236
170
xx = DoubleFloat {T} (numerator (x)) / denominator (x)
237
171
return xx == y
238
172
end
239
- @inline function (!= )(x:: Rational , y:: DoubleFloat{T} ) where {T<: IEEEFloat }
240
- xx = DoubleFloat {T} (numerator (x)) / denominator (x)
241
- return xx != y
242
- end
243
173
@inline function (< )(x:: Rational , y:: DoubleFloat{T} ) where {T<: IEEEFloat }
244
174
xx = DoubleFloat {T} (numerator (x)) / denominator (x)
245
175
return xx < y
246
176
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
251
177
@inline function (<= )(x:: Rational , y:: DoubleFloat{T} ) where {T<: IEEEFloat }
252
178
xx = DoubleFloat {T} (numerator (x)) / denominator (x)
253
179
return xx <= y
254
180
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
259
181
260
182
@inline function isequal (x:: Rational , y:: DoubleFloat{T} ) where {T<: IEEEFloat }
261
183
xx = DoubleFloat {T} (numerator (x)) / denominator (x)
0 commit comments