@@ -4,7 +4,6 @@ error: strict comparison of `f32` or `f64`
4
4
LL | let _ = x == y;
5
5
| ^^^^^^ help: consider comparing them within some margin of error: `(x - y).abs() < error_margin`
6
6
|
7
- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
8
7
= note: `-D clippy::float-cmp` implied by `-D warnings`
9
8
= help: to override `-D warnings` add `#[allow(clippy::float_cmp)]`
10
9
@@ -13,208 +12,156 @@ error: strict comparison of `f32` or `f64`
13
12
|
14
13
LL | let _ = x != y;
15
14
| ^^^^^^ help: consider comparing them within some margin of error: `(x - y).abs() > error_margin`
16
- |
17
- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
18
15
19
16
error: strict comparison of `f32` or `f64`
20
17
--> $DIR/float_cmp.rs:13:21
21
18
|
22
19
LL | let _ = x == 5.5;
23
20
| ^^^^^^^^ help: consider comparing them within some margin of error: `(x - 5.5).abs() < error_margin`
24
- |
25
- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
26
21
27
22
error: strict comparison of `f32` or `f64`
28
23
--> $DIR/float_cmp.rs:15:21
29
24
|
30
25
LL | let _ = 5.5 == x;
31
26
| ^^^^^^^^ help: consider comparing them within some margin of error: `(5.5 - x).abs() < error_margin`
32
- |
33
- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
34
27
35
28
error: strict comparison of `f32` or `f64`
36
29
--> $DIR/float_cmp.rs:39:21
37
30
|
38
31
LL | let _ = x == y;
39
32
| ^^^^^^ help: consider comparing them within some margin of error: `(x - y).abs() < error_margin`
40
- |
41
- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
42
33
43
34
error: strict comparison of `f32` or `f64`
44
35
--> $DIR/float_cmp.rs:41:21
45
36
|
46
37
LL | let _ = x != y;
47
38
| ^^^^^^ help: consider comparing them within some margin of error: `(x - y).abs() > error_margin`
48
- |
49
- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
50
39
51
40
error: strict comparison of `f32` or `f64`
52
41
--> $DIR/float_cmp.rs:43:21
53
42
|
54
43
LL | let _ = x == 5.5;
55
44
| ^^^^^^^^ help: consider comparing them within some margin of error: `(x - 5.5).abs() < error_margin`
56
- |
57
- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
58
45
59
46
error: strict comparison of `f32` or `f64`
60
47
--> $DIR/float_cmp.rs:45:21
61
48
|
62
49
LL | let _ = 5.5 == x;
63
50
| ^^^^^^^^ help: consider comparing them within some margin of error: `(5.5 - x).abs() < error_margin`
64
- |
65
- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
66
51
67
52
error: strict comparison of `f32` or `f64` arrays
68
53
--> $DIR/float_cmp.rs:69:21
69
54
|
70
55
LL | let _ = x == y;
71
56
| ^^^^^^
72
- |
73
- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
74
57
75
58
error: strict comparison of `f32` or `f64` arrays
76
59
--> $DIR/float_cmp.rs:71:21
77
60
|
78
61
LL | let _ = x == [5.5; 4];
79
62
| ^^^^^^^^^^^^^
80
- |
81
- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
82
63
83
64
error: strict comparison of `f32` or `f64` arrays
84
65
--> $DIR/float_cmp.rs:73:21
85
66
|
86
67
LL | let _ = [5.5; 4] == x;
87
68
| ^^^^^^^^^^^^^
88
- |
89
- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
90
69
91
70
error: strict comparison of `f32` or `f64` arrays
92
71
--> $DIR/float_cmp.rs:75:21
93
72
|
94
73
LL | let _ = [0.0, 0.0, 0.0, 5.5] == x;
95
74
| ^^^^^^^^^^^^^^^^^^^^^^^^^
96
- |
97
- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
98
75
99
76
error: strict comparison of `f32` or `f64` arrays
100
77
--> $DIR/float_cmp.rs:77:21
101
78
|
102
79
LL | let _ = x == [0.0, 0.0, 0.0, 5.5];
103
80
| ^^^^^^^^^^^^^^^^^^^^^^^^^
104
- |
105
- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
106
81
107
82
error: strict comparison of `f32` or `f64` arrays
108
83
--> $DIR/float_cmp.rs:94:21
109
84
|
110
85
LL | let _ = x == y;
111
86
| ^^^^^^
112
- |
113
- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
114
87
115
88
error: strict comparison of `f32` or `f64` arrays
116
89
--> $DIR/float_cmp.rs:96:21
117
90
|
118
91
LL | let _ = x == [5.5; 4];
119
92
| ^^^^^^^^^^^^^
120
- |
121
- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
122
93
123
94
error: strict comparison of `f32` or `f64` arrays
124
95
--> $DIR/float_cmp.rs:98:21
125
96
|
126
97
LL | let _ = [5.5; 4] == x;
127
98
| ^^^^^^^^^^^^^
128
- |
129
- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
130
99
131
100
error: strict comparison of `f32` or `f64` arrays
132
101
--> $DIR/float_cmp.rs:100:21
133
102
|
134
103
LL | let _ = [0.0, 0.0, 0.0, 5.5] == x;
135
104
| ^^^^^^^^^^^^^^^^^^^^^^^^^
136
- |
137
- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
138
105
139
106
error: strict comparison of `f32` or `f64` arrays
140
107
--> $DIR/float_cmp.rs:102:21
141
108
|
142
109
LL | let _ = x == [0.0, 0.0, 0.0, 5.5];
143
110
| ^^^^^^^^^^^^^^^^^^^^^^^^^
144
- |
145
- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
146
111
147
112
error: strict comparison of `f32` or `f64`
148
113
--> $DIR/float_cmp.rs:121:21
149
114
|
150
115
LL | let _ = x == y;
151
116
| ^^^^^^ help: consider comparing them within some margin of error: `(x - y).abs() < error_margin`
152
- |
153
- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
154
117
155
118
error: strict comparison of `f32` or `f64` arrays
156
119
--> $DIR/float_cmp.rs:129:21
157
120
|
158
121
LL | let _ = x == y;
159
122
| ^^^^^^
160
- |
161
- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
162
123
163
124
error: strict comparison of `f32` or `f64`
164
125
--> $DIR/float_cmp.rs:147:21
165
126
|
166
127
LL | let _ = C * x == x * x;
167
128
| ^^^^^^^^^^^^^^ help: consider comparing them within some margin of error: `(C * x - x * x).abs() < error_margin`
168
- |
169
- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
170
129
171
130
error: strict comparison of `f32` or `f64`
172
131
--> $DIR/float_cmp.rs:149:21
173
132
|
174
133
LL | let _ = x * x == C * x;
175
134
| ^^^^^^^^^^^^^^ help: consider comparing them within some margin of error: `(x * x - C * x).abs() < error_margin`
176
- |
177
- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
178
135
179
136
error: strict comparison of `f32` or `f64`
180
137
--> $DIR/float_cmp.rs:176:17
181
138
|
182
139
LL | let _ = f(1.0) == f(5.0);
183
140
| ^^^^^^^^^^^^^^^^ help: consider comparing them within some margin of error: `(f(1.0) - f(5.0)).abs() < error_margin`
184
- |
185
- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
186
141
187
142
error: strict comparison of `f32` or `f64`
188
143
--> $DIR/float_cmp.rs:178:17
189
144
|
190
145
LL | let _ = 1.0 == f(5.0);
191
146
| ^^^^^^^^^^^^^ help: consider comparing them within some margin of error: `(1.0 - f(5.0)).abs() < error_margin`
192
- |
193
- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
194
147
195
148
error: strict comparison of `f32` or `f64`
196
149
--> $DIR/float_cmp.rs:180:17
197
150
|
198
151
LL | let _ = f(1.0) + 1.0 != 5.0;
199
152
| ^^^^^^^^^^^^^^^^^^^ help: consider comparing them within some margin of error: `(f(1.0) + 1.0 - 5.0).abs() > error_margin`
200
- |
201
- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
202
153
203
154
error: strict comparison of `f32` or `f64`
204
155
--> $DIR/float_cmp.rs:223:21
205
156
|
206
157
LL | let _ = x == C[1];
207
158
| ^^^^^^^^^ help: consider comparing them within some margin of error: `(x - C[1]).abs() < error_margin`
208
- |
209
- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
210
159
211
160
error: strict comparison of `f32` or `f64`
212
161
--> $DIR/float_cmp.rs:225:21
213
162
|
214
163
LL | let _ = C[1] == x;
215
164
| ^^^^^^^^^ help: consider comparing them within some margin of error: `(C[1] - x).abs() < error_margin`
216
- |
217
- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
218
165
219
166
error: aborting due to 27 previous errors
220
167
0 commit comments