2019-12-21 01:57:47 +00:00
|
|
|
error: exponent for bases 2 and e can be computed more accurately
|
2024-06-18 17:34:49 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:8:13
|
2019-12-21 01:57:47 +00:00
|
|
|
|
|
|
|
|
LL | let _ = 2f32.powf(x);
|
|
|
|
| ^^^^^^^^^^^^ help: consider using: `x.exp2()`
|
|
|
|
|
|
2020-02-17 20:56:55 +00:00
|
|
|
= note: `-D clippy::suboptimal-flops` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::suboptimal_flops)]`
|
2019-12-21 01:57:47 +00:00
|
|
|
|
|
|
|
error: exponent for bases 2 and e can be computed more accurately
|
2024-06-18 17:34:49 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:9:13
|
2019-12-21 01:57:47 +00:00
|
|
|
|
|
2020-01-04 06:19:13 +00:00
|
|
|
LL | let _ = 2f32.powf(3.1);
|
|
|
|
| ^^^^^^^^^^^^^^ help: consider using: `3.1f32.exp2()`
|
|
|
|
|
|
|
|
error: exponent for bases 2 and e can be computed more accurately
|
2024-06-18 17:34:49 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:10:13
|
2020-01-04 06:19:13 +00:00
|
|
|
|
|
|
|
|
LL | let _ = 2f32.powf(-3.1);
|
|
|
|
| ^^^^^^^^^^^^^^^ help: consider using: `(-3.1f32).exp2()`
|
|
|
|
|
|
|
|
error: exponent for bases 2 and e can be computed more accurately
|
2024-06-18 17:34:49 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:11:13
|
2020-01-04 06:19:13 +00:00
|
|
|
|
|
2019-12-21 01:57:47 +00:00
|
|
|
LL | let _ = std::f32::consts::E.powf(x);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.exp()`
|
|
|
|
|
2020-01-04 06:19:13 +00:00
|
|
|
error: exponent for bases 2 and e can be computed more accurately
|
2024-06-18 17:34:49 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:12:13
|
2020-01-04 06:19:13 +00:00
|
|
|
|
|
|
|
|
LL | let _ = std::f32::consts::E.powf(3.1);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `3.1f32.exp()`
|
|
|
|
|
|
|
|
error: exponent for bases 2 and e can be computed more accurately
|
2024-06-18 17:34:49 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:13:13
|
2020-01-04 06:19:13 +00:00
|
|
|
|
|
|
|
|
LL | let _ = std::f32::consts::E.powf(-3.1);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(-3.1f32).exp()`
|
|
|
|
|
2019-12-21 01:57:47 +00:00
|
|
|
error: square-root of a number can be computed more efficiently and accurately
|
2024-06-18 17:34:49 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:14:13
|
2019-12-21 01:57:47 +00:00
|
|
|
|
|
|
|
|
LL | let _ = x.powf(1.0 / 2.0);
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: consider using: `x.sqrt()`
|
|
|
|
|
|
|
|
error: cube-root of a number can be computed more accurately
|
2024-06-18 17:34:49 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:15:13
|
2019-12-21 01:57:47 +00:00
|
|
|
|
|
|
|
|
LL | let _ = x.powf(1.0 / 3.0);
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: consider using: `x.cbrt()`
|
2020-02-24 05:06:55 +00:00
|
|
|
|
|
|
|
|
= note: `-D clippy::imprecise-flops` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::imprecise_flops)]`
|
2019-12-21 01:57:47 +00:00
|
|
|
|
2022-08-31 13:24:45 +00:00
|
|
|
error: cube-root of a number can be computed more accurately
|
2024-06-18 17:34:49 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:16:13
|
2019-12-21 01:57:47 +00:00
|
|
|
|
|
2022-08-31 13:24:45 +00:00
|
|
|
LL | let _ = (x as f32).powf(1.0 / 3.0);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x as f32).cbrt()`
|
|
|
|
|
|
|
|
error: exponentiation with integer powers can be computed more efficiently
|
2024-06-18 17:34:49 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:17:13
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
2020-07-14 12:59:59 +00:00
|
|
|
LL | let _ = x.powf(3.0);
|
|
|
|
| ^^^^^^^^^^^ help: consider using: `x.powi(3)`
|
2019-12-21 01:57:47 +00:00
|
|
|
|
|
|
|
error: exponentiation with integer powers can be computed more efficiently
|
2024-06-18 17:34:49 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:18:13
|
2019-12-21 01:57:47 +00:00
|
|
|
|
|
|
|
|
LL | let _ = x.powf(-2.0);
|
|
|
|
| ^^^^^^^^^^^^ help: consider using: `x.powi(-2)`
|
|
|
|
|
2020-02-23 04:32:13 +00:00
|
|
|
error: exponentiation with integer powers can be computed more efficiently
|
2024-06-18 17:34:49 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:19:13
|
2020-02-23 04:32:13 +00:00
|
|
|
|
|
|
|
|
LL | let _ = x.powf(16_777_215.0);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.powi(16_777_215)`
|
|
|
|
|
|
|
|
error: exponentiation with integer powers can be computed more efficiently
|
2024-06-18 17:34:49 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:20:13
|
2020-02-23 04:32:13 +00:00
|
|
|
|
|
|
|
|
LL | let _ = x.powf(-16_777_215.0);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.powi(-16_777_215)`
|
|
|
|
|
2022-08-31 13:24:45 +00:00
|
|
|
error: exponentiation with integer powers can be computed more efficiently
|
2024-06-18 17:34:49 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:21:13
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | let _ = (x as f32).powf(-16_777_215.0);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x as f32).powi(-16_777_215)`
|
|
|
|
|
|
|
|
error: exponentiation with integer powers can be computed more efficiently
|
2024-06-18 17:34:49 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:22:13
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | let _ = (x as f32).powf(3.0);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x as f32).powi(3)`
|
|
|
|
|
2022-09-09 11:36:26 +00:00
|
|
|
error: cube-root of a number can be computed more accurately
|
2024-06-18 17:34:49 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:23:13
|
2022-09-09 11:36:26 +00:00
|
|
|
|
|
|
|
|
LL | let _ = (1.5_f32 + 1.0).powf(1.0 / 3.0);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(1.5_f32 + 1.0).cbrt()`
|
|
|
|
|
|
|
|
error: cube-root of a number can be computed more accurately
|
2024-06-18 17:34:49 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:24:13
|
2022-09-09 11:36:26 +00:00
|
|
|
|
|
|
|
|
LL | let _ = 1.5_f64.powf(1.0 / 3.0);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `1.5_f64.cbrt()`
|
|
|
|
|
|
|
|
error: square-root of a number can be computed more efficiently and accurately
|
2024-06-18 17:34:49 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:25:13
|
2022-09-09 11:36:26 +00:00
|
|
|
|
|
|
|
|
LL | let _ = 1.5_f64.powf(1.0 / 2.0);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `1.5_f64.sqrt()`
|
|
|
|
|
|
|
|
error: exponentiation with integer powers can be computed more efficiently
|
2024-06-18 17:34:49 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:26:13
|
2022-09-09 11:36:26 +00:00
|
|
|
|
|
|
|
|
LL | let _ = 1.5_f64.powf(3.0);
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: consider using: `1.5_f64.powi(3)`
|
|
|
|
|
2019-12-21 01:57:47 +00:00
|
|
|
error: exponent for bases 2 and e can be computed more accurately
|
2024-07-25 16:29:17 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:34:13
|
|
|
|
|
|
|
|
|
LL | let _ = 2f32.powf(1f32 + m!(2.0));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(1f32 + m!(2.0)).exp2()`
|
|
|
|
|
|
|
|
error: exponent for bases 2 and e can be computed more accurately
|
|
|
|
--> tests/ui/floating_point_powf.rs:43:13
|
2019-12-21 01:57:47 +00:00
|
|
|
|
|
|
|
|
LL | let _ = 2f64.powf(x);
|
|
|
|
| ^^^^^^^^^^^^ help: consider using: `x.exp2()`
|
|
|
|
|
|
|
|
error: exponent for bases 2 and e can be computed more accurately
|
2024-07-25 16:29:17 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:44:13
|
2020-01-04 06:19:13 +00:00
|
|
|
|
|
|
|
|
LL | let _ = 2f64.powf(3.1);
|
|
|
|
| ^^^^^^^^^^^^^^ help: consider using: `3.1f64.exp2()`
|
|
|
|
|
|
|
|
error: exponent for bases 2 and e can be computed more accurately
|
2024-07-25 16:29:17 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:45:13
|
2020-01-04 06:19:13 +00:00
|
|
|
|
|
|
|
|
LL | let _ = 2f64.powf(-3.1);
|
|
|
|
| ^^^^^^^^^^^^^^^ help: consider using: `(-3.1f64).exp2()`
|
|
|
|
|
|
|
|
error: exponent for bases 2 and e can be computed more accurately
|
2024-07-25 16:29:17 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:46:13
|
2019-12-21 01:57:47 +00:00
|
|
|
|
|
|
|
|
LL | let _ = std::f64::consts::E.powf(x);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.exp()`
|
|
|
|
|
2020-01-04 06:19:13 +00:00
|
|
|
error: exponent for bases 2 and e can be computed more accurately
|
2024-07-25 16:29:17 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:47:13
|
2020-01-04 06:19:13 +00:00
|
|
|
|
|
|
|
|
LL | let _ = std::f64::consts::E.powf(3.1);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `3.1f64.exp()`
|
|
|
|
|
|
|
|
error: exponent for bases 2 and e can be computed more accurately
|
2024-07-25 16:29:17 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:48:13
|
2020-01-04 06:19:13 +00:00
|
|
|
|
|
|
|
|
LL | let _ = std::f64::consts::E.powf(-3.1);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(-3.1f64).exp()`
|
|
|
|
|
2019-12-21 01:57:47 +00:00
|
|
|
error: square-root of a number can be computed more efficiently and accurately
|
2024-07-25 16:29:17 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:49:13
|
2019-12-21 01:57:47 +00:00
|
|
|
|
|
|
|
|
LL | let _ = x.powf(1.0 / 2.0);
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: consider using: `x.sqrt()`
|
|
|
|
|
|
|
|
error: cube-root of a number can be computed more accurately
|
2024-07-25 16:29:17 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:50:13
|
2019-12-21 01:57:47 +00:00
|
|
|
|
|
|
|
|
LL | let _ = x.powf(1.0 / 3.0);
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: consider using: `x.cbrt()`
|
|
|
|
|
|
|
|
error: exponentiation with integer powers can be computed more efficiently
|
2024-07-25 16:29:17 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:51:13
|
2019-12-21 01:57:47 +00:00
|
|
|
|
|
2020-07-14 12:59:59 +00:00
|
|
|
LL | let _ = x.powf(3.0);
|
|
|
|
| ^^^^^^^^^^^ help: consider using: `x.powi(3)`
|
2019-12-21 01:57:47 +00:00
|
|
|
|
|
|
|
error: exponentiation with integer powers can be computed more efficiently
|
2024-07-25 16:29:17 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:52:13
|
2019-12-21 01:57:47 +00:00
|
|
|
|
|
|
|
|
LL | let _ = x.powf(-2.0);
|
|
|
|
| ^^^^^^^^^^^^ help: consider using: `x.powi(-2)`
|
|
|
|
|
2020-02-23 04:32:13 +00:00
|
|
|
error: exponentiation with integer powers can be computed more efficiently
|
2024-07-25 16:29:17 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:53:13
|
2020-02-23 04:32:13 +00:00
|
|
|
|
|
|
|
|
LL | let _ = x.powf(-2_147_483_648.0);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.powi(-2_147_483_648)`
|
|
|
|
|
|
|
|
error: exponentiation with integer powers can be computed more efficiently
|
2024-07-25 16:29:17 +00:00
|
|
|
--> tests/ui/floating_point_powf.rs:54:13
|
2020-02-23 04:32:13 +00:00
|
|
|
|
|
|
|
|
LL | let _ = x.powf(2_147_483_647.0);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.powi(2_147_483_647)`
|
|
|
|
|
2024-07-25 16:29:17 +00:00
|
|
|
error: aborting due to 32 previous errors
|
2019-12-21 01:57:47 +00:00
|
|
|
|