]> git.lizzy.rs Git - rust.git/blob - tests/ui/floating_point_powf.stderr
Split test cases into separate files
[rust.git] / tests / ui / floating_point_powf.stderr
1 error: exponent for bases 2 and e can be computed more accurately
2   --> $DIR/floating_point_powf.rs:5:13
3    |
4 LL |     let _ = 2f32.powf(x);
5    |             ^^^^^^^^^^^^ help: consider using: `x.exp2()`
6    |
7    = note: `-D clippy::floating-point-improvements` implied by `-D warnings`
8
9 error: exponent for bases 2 and e can be computed more accurately
10   --> $DIR/floating_point_powf.rs:6:13
11    |
12 LL |     let _ = std::f32::consts::E.powf(x);
13    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.exp()`
14
15 error: square-root of a number can be computed more efficiently and accurately
16   --> $DIR/floating_point_powf.rs:7:13
17    |
18 LL |     let _ = x.powf(1.0 / 2.0);
19    |             ^^^^^^^^^^^^^^^^^ help: consider using: `x.sqrt()`
20
21 error: cube-root of a number can be computed more accurately
22   --> $DIR/floating_point_powf.rs:8:13
23    |
24 LL |     let _ = x.powf(1.0 / 3.0);
25    |             ^^^^^^^^^^^^^^^^^ help: consider using: `x.cbrt()`
26
27 error: exponentiation with integer powers can be computed more efficiently
28   --> $DIR/floating_point_powf.rs:9:13
29    |
30 LL |     let _ = x.powf(2.0);
31    |             ^^^^^^^^^^^ help: consider using: `x.powi(2)`
32
33 error: exponentiation with integer powers can be computed more efficiently
34   --> $DIR/floating_point_powf.rs:10:13
35    |
36 LL |     let _ = x.powf(-2.0);
37    |             ^^^^^^^^^^^^ help: consider using: `x.powi(-2)`
38
39 error: exponent for bases 2 and e can be computed more accurately
40   --> $DIR/floating_point_powf.rs:17:13
41    |
42 LL |     let _ = 2f64.powf(x);
43    |             ^^^^^^^^^^^^ help: consider using: `x.exp2()`
44
45 error: exponent for bases 2 and e can be computed more accurately
46   --> $DIR/floating_point_powf.rs:18:13
47    |
48 LL |     let _ = std::f64::consts::E.powf(x);
49    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.exp()`
50
51 error: square-root of a number can be computed more efficiently and accurately
52   --> $DIR/floating_point_powf.rs:19:13
53    |
54 LL |     let _ = x.powf(1.0 / 2.0);
55    |             ^^^^^^^^^^^^^^^^^ help: consider using: `x.sqrt()`
56
57 error: cube-root of a number can be computed more accurately
58   --> $DIR/floating_point_powf.rs:20:13
59    |
60 LL |     let _ = x.powf(1.0 / 3.0);
61    |             ^^^^^^^^^^^^^^^^^ help: consider using: `x.cbrt()`
62
63 error: exponentiation with integer powers can be computed more efficiently
64   --> $DIR/floating_point_powf.rs:21:13
65    |
66 LL |     let _ = x.powf(2.0);
67    |             ^^^^^^^^^^^ help: consider using: `x.powi(2)`
68
69 error: exponentiation with integer powers can be computed more efficiently
70   --> $DIR/floating_point_powf.rs:22:13
71    |
72 LL |     let _ = x.powf(-2.0);
73    |             ^^^^^^^^^^^^ help: consider using: `x.powi(-2)`
74
75 error: aborting due to 12 previous errors
76