@@ -4,7 +4,6 @@ error: strict comparison of `f32` or `f64`
44LL | let _ = x == y;
55 | ^^^^^^ help: consider comparing them within some margin of error: `(x - y).abs() < error_margin`
66 |
7- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
87 = note: `-D clippy::float-cmp` implied by `-D warnings`
98 = help: to override `-D warnings` add `#[allow(clippy::float_cmp)]`
109
@@ -13,208 +12,156 @@ error: strict comparison of `f32` or `f64`
1312 |
1413LL | let _ = x != y;
1514 | ^^^^^^ 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`
1815
1916error: strict comparison of `f32` or `f64`
2017 --> $DIR/float_cmp.rs:13:21
2118 |
2219LL | let _ = x == 5.5;
2320 | ^^^^^^^^ 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`
2621
2722error: strict comparison of `f32` or `f64`
2823 --> $DIR/float_cmp.rs:15:21
2924 |
3025LL | let _ = 5.5 == x;
3126 | ^^^^^^^^ 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`
3427
3528error: strict comparison of `f32` or `f64`
3629 --> $DIR/float_cmp.rs:39:21
3730 |
3831LL | let _ = x == y;
3932 | ^^^^^^ 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`
4233
4334error: strict comparison of `f32` or `f64`
4435 --> $DIR/float_cmp.rs:41:21
4536 |
4637LL | let _ = x != y;
4738 | ^^^^^^ 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`
5039
5140error: strict comparison of `f32` or `f64`
5241 --> $DIR/float_cmp.rs:43:21
5342 |
5443LL | let _ = x == 5.5;
5544 | ^^^^^^^^ 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`
5845
5946error: strict comparison of `f32` or `f64`
6047 --> $DIR/float_cmp.rs:45:21
6148 |
6249LL | let _ = 5.5 == x;
6350 | ^^^^^^^^ 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`
6651
6752error: strict comparison of `f32` or `f64` arrays
6853 --> $DIR/float_cmp.rs:69:21
6954 |
7055LL | let _ = x == y;
7156 | ^^^^^^
72- |
73- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
7457
7558error: strict comparison of `f32` or `f64` arrays
7659 --> $DIR/float_cmp.rs:71:21
7760 |
7861LL | let _ = x == [5.5; 4];
7962 | ^^^^^^^^^^^^^
80- |
81- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
8263
8364error: strict comparison of `f32` or `f64` arrays
8465 --> $DIR/float_cmp.rs:73:21
8566 |
8667LL | let _ = [5.5; 4] == x;
8768 | ^^^^^^^^^^^^^
88- |
89- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
9069
9170error: strict comparison of `f32` or `f64` arrays
9271 --> $DIR/float_cmp.rs:75:21
9372 |
9473LL | let _ = [0.0, 0.0, 0.0, 5.5] == x;
9574 | ^^^^^^^^^^^^^^^^^^^^^^^^^
96- |
97- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
9875
9976error: strict comparison of `f32` or `f64` arrays
10077 --> $DIR/float_cmp.rs:77:21
10178 |
10279LL | let _ = x == [0.0, 0.0, 0.0, 5.5];
10380 | ^^^^^^^^^^^^^^^^^^^^^^^^^
104- |
105- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
10681
10782error: strict comparison of `f32` or `f64` arrays
10883 --> $DIR/float_cmp.rs:94:21
10984 |
11085LL | let _ = x == y;
11186 | ^^^^^^
112- |
113- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
11487
11588error: strict comparison of `f32` or `f64` arrays
11689 --> $DIR/float_cmp.rs:96:21
11790 |
11891LL | let _ = x == [5.5; 4];
11992 | ^^^^^^^^^^^^^
120- |
121- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
12293
12394error: strict comparison of `f32` or `f64` arrays
12495 --> $DIR/float_cmp.rs:98:21
12596 |
12697LL | let _ = [5.5; 4] == x;
12798 | ^^^^^^^^^^^^^
128- |
129- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
13099
131100error: strict comparison of `f32` or `f64` arrays
132101 --> $DIR/float_cmp.rs:100:21
133102 |
134103LL | let _ = [0.0, 0.0, 0.0, 5.5] == x;
135104 | ^^^^^^^^^^^^^^^^^^^^^^^^^
136- |
137- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
138105
139106error: strict comparison of `f32` or `f64` arrays
140107 --> $DIR/float_cmp.rs:102:21
141108 |
142109LL | let _ = x == [0.0, 0.0, 0.0, 5.5];
143110 | ^^^^^^^^^^^^^^^^^^^^^^^^^
144- |
145- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
146111
147112error: strict comparison of `f32` or `f64`
148113 --> $DIR/float_cmp.rs:121:21
149114 |
150115LL | let _ = x == y;
151116 | ^^^^^^ 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`
154117
155118error: strict comparison of `f32` or `f64` arrays
156119 --> $DIR/float_cmp.rs:129:21
157120 |
158121LL | let _ = x == y;
159122 | ^^^^^^
160- |
161- = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
162123
163124error: strict comparison of `f32` or `f64`
164125 --> $DIR/float_cmp.rs:147:21
165126 |
166127LL | let _ = C * x == x * x;
167128 | ^^^^^^^^^^^^^^ 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`
170129
171130error: strict comparison of `f32` or `f64`
172131 --> $DIR/float_cmp.rs:149:21
173132 |
174133LL | let _ = x * x == C * x;
175134 | ^^^^^^^^^^^^^^ 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`
178135
179136error: strict comparison of `f32` or `f64`
180137 --> $DIR/float_cmp.rs:176:17
181138 |
182139LL | let _ = f(1.0) == f(5.0);
183140 | ^^^^^^^^^^^^^^^^ 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`
186141
187142error: strict comparison of `f32` or `f64`
188143 --> $DIR/float_cmp.rs:178:17
189144 |
190145LL | let _ = 1.0 == f(5.0);
191146 | ^^^^^^^^^^^^^ 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`
194147
195148error: strict comparison of `f32` or `f64`
196149 --> $DIR/float_cmp.rs:180:17
197150 |
198151LL | let _ = f(1.0) + 1.0 != 5.0;
199152 | ^^^^^^^^^^^^^^^^^^^ 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`
202153
203154error: strict comparison of `f32` or `f64`
204155 --> $DIR/float_cmp.rs:223:21
205156 |
206157LL | let _ = x == C[1];
207158 | ^^^^^^^^^ 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`
210159
211160error: strict comparison of `f32` or `f64`
212161 --> $DIR/float_cmp.rs:225:21
213162 |
214163LL | let _ = C[1] == x;
215164 | ^^^^^^^^^ 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`
218165
219166error: aborting due to 27 previous errors
220167
0 commit comments