]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/floating_point_log.stderr
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / clippy / tests / ui / floating_point_log.stderr
CommitLineData
f20569fa
XL
1error: logarithm for bases 2, 10 and e can be computed more accurately
2 --> $DIR/floating_point_log.rs:10:13
3 |
4LL | let _ = x.log(2f32);
5 | ^^^^^^^^^^^ help: consider using: `x.log2()`
6 |
7 = note: `-D clippy::suboptimal-flops` implied by `-D warnings`
8
9error: logarithm for bases 2, 10 and e can be computed more accurately
10 --> $DIR/floating_point_log.rs:11:13
11 |
12LL | let _ = x.log(10f32);
13 | ^^^^^^^^^^^^ help: consider using: `x.log10()`
14
15error: logarithm for bases 2, 10 and e can be computed more accurately
16 --> $DIR/floating_point_log.rs:12:13
17 |
18LL | let _ = x.log(std::f32::consts::E);
19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.ln()`
20
21error: logarithm for bases 2, 10 and e can be computed more accurately
22 --> $DIR/floating_point_log.rs:13:13
23 |
24LL | let _ = x.log(TWO);
25 | ^^^^^^^^^^ help: consider using: `x.log2()`
26
27error: logarithm for bases 2, 10 and e can be computed more accurately
28 --> $DIR/floating_point_log.rs:14:13
29 |
30LL | let _ = x.log(E);
31 | ^^^^^^^^ help: consider using: `x.ln()`
32
33error: logarithm for bases 2, 10 and e can be computed more accurately
34 --> $DIR/floating_point_log.rs:17:13
35 |
36LL | let _ = x.log(2f64);
37 | ^^^^^^^^^^^ help: consider using: `x.log2()`
38
39error: logarithm for bases 2, 10 and e can be computed more accurately
40 --> $DIR/floating_point_log.rs:18:13
41 |
42LL | let _ = x.log(10f64);
43 | ^^^^^^^^^^^^ help: consider using: `x.log10()`
44
45error: logarithm for bases 2, 10 and e can be computed more accurately
46 --> $DIR/floating_point_log.rs:19:13
47 |
48LL | let _ = x.log(std::f64::consts::E);
49 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.ln()`
50
51error: ln(1 + x) can be computed more accurately
52 --> $DIR/floating_point_log.rs:24:13
53 |
54LL | let _ = (1f32 + 2.).ln();
55 | ^^^^^^^^^^^^^^^^ help: consider using: `2.0f32.ln_1p()`
56 |
57 = note: `-D clippy::imprecise-flops` implied by `-D warnings`
58
59error: ln(1 + x) can be computed more accurately
60 --> $DIR/floating_point_log.rs:25:13
61 |
62LL | let _ = (1f32 + 2.0).ln();
63 | ^^^^^^^^^^^^^^^^^ help: consider using: `2.0f32.ln_1p()`
64
65error: ln(1 + x) can be computed more accurately
66 --> $DIR/floating_point_log.rs:26:13
67 |
68LL | let _ = (1.0 + x).ln();
69 | ^^^^^^^^^^^^^^ help: consider using: `x.ln_1p()`
70
71error: ln(1 + x) can be computed more accurately
72 --> $DIR/floating_point_log.rs:27:13
73 |
74LL | let _ = (1.0 + x / 2.0).ln();
75 | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x / 2.0).ln_1p()`
76
77error: ln(1 + x) can be computed more accurately
78 --> $DIR/floating_point_log.rs:28:13
79 |
80LL | let _ = (1.0 + x.powi(3)).ln();
81 | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.powi(3).ln_1p()`
82
83error: ln(1 + x) can be computed more accurately
84 --> $DIR/floating_point_log.rs:29:13
85 |
86LL | let _ = (1.0 + x.powi(3) / 2.0).ln();
87 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x.powi(3) / 2.0).ln_1p()`
88
89error: ln(1 + x) can be computed more accurately
90 --> $DIR/floating_point_log.rs:30:13
91 |
92LL | let _ = (1.0 + (std::f32::consts::E - 1.0)).ln();
93 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `((std::f32::consts::E - 1.0)).ln_1p()`
94
95error: ln(1 + x) can be computed more accurately
96 --> $DIR/floating_point_log.rs:31:13
97 |
98LL | let _ = (x + 1.0).ln();
99 | ^^^^^^^^^^^^^^ help: consider using: `x.ln_1p()`
100
101error: ln(1 + x) can be computed more accurately
102 --> $DIR/floating_point_log.rs:32:13
103 |
104LL | let _ = (x.powi(3) + 1.0).ln();
105 | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.powi(3).ln_1p()`
106
107error: ln(1 + x) can be computed more accurately
108 --> $DIR/floating_point_log.rs:33:13
109 |
110LL | let _ = (x + 2.0 + 1.0).ln();
111 | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x + 2.0).ln_1p()`
112
113error: ln(1 + x) can be computed more accurately
114 --> $DIR/floating_point_log.rs:34:13
115 |
116LL | let _ = (x / 2.0 + 1.0).ln();
117 | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x / 2.0).ln_1p()`
118
119error: ln(1 + x) can be computed more accurately
120 --> $DIR/floating_point_log.rs:42:13
121 |
122LL | let _ = (1f64 + 2.).ln();
123 | ^^^^^^^^^^^^^^^^ help: consider using: `2.0f64.ln_1p()`
124
125error: ln(1 + x) can be computed more accurately
126 --> $DIR/floating_point_log.rs:43:13
127 |
128LL | let _ = (1f64 + 2.0).ln();
129 | ^^^^^^^^^^^^^^^^^ help: consider using: `2.0f64.ln_1p()`
130
131error: ln(1 + x) can be computed more accurately
132 --> $DIR/floating_point_log.rs:44:13
133 |
134LL | let _ = (1.0 + x).ln();
135 | ^^^^^^^^^^^^^^ help: consider using: `x.ln_1p()`
136
137error: ln(1 + x) can be computed more accurately
138 --> $DIR/floating_point_log.rs:45:13
139 |
140LL | let _ = (1.0 + x / 2.0).ln();
141 | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x / 2.0).ln_1p()`
142
143error: ln(1 + x) can be computed more accurately
144 --> $DIR/floating_point_log.rs:46:13
145 |
146LL | let _ = (1.0 + x.powi(3)).ln();
147 | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.powi(3).ln_1p()`
148
149error: ln(1 + x) can be computed more accurately
150 --> $DIR/floating_point_log.rs:47:13
151 |
152LL | let _ = (x + 1.0).ln();
153 | ^^^^^^^^^^^^^^ help: consider using: `x.ln_1p()`
154
155error: ln(1 + x) can be computed more accurately
156 --> $DIR/floating_point_log.rs:48:13
157 |
158LL | let _ = (x.powi(3) + 1.0).ln();
159 | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.powi(3).ln_1p()`
160
161error: ln(1 + x) can be computed more accurately
162 --> $DIR/floating_point_log.rs:49:13
163 |
164LL | let _ = (x + 2.0 + 1.0).ln();
165 | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x + 2.0).ln_1p()`
166
167error: ln(1 + x) can be computed more accurately
168 --> $DIR/floating_point_log.rs:50:13
169 |
170LL | let _ = (x / 2.0 + 1.0).ln();
171 | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x / 2.0).ln_1p()`
172
173error: aborting due to 28 previous errors
174