2 #![warn(clippy::suboptimal_flops, clippy::imprecise_flops)]
7 let _ = 2f32.powf(3.1);
8 let _ = 2f32.powf(-3.1);
9 let _ = std::f32::consts::E.powf(x);
10 let _ = std::f32::consts::E.powf(3.1);
11 let _ = std::f32::consts::E.powf(-3.1);
12 let _ = x.powf(1.0 / 2.0);
13 let _ = x.powf(1.0 / 3.0);
16 let _ = x.powf(16_777_215.0);
17 let _ = x.powf(-16_777_215.0);
18 // Cases where the lint shouldn't be applied
21 let _ = x.powf(16_777_216.0);
22 let _ = x.powf(-16_777_216.0);
26 let _ = 2f64.powf(3.1);
27 let _ = 2f64.powf(-3.1);
28 let _ = std::f64::consts::E.powf(x);
29 let _ = std::f64::consts::E.powf(3.1);
30 let _ = std::f64::consts::E.powf(-3.1);
31 let _ = x.powf(1.0 / 2.0);
32 let _ = x.powf(1.0 / 3.0);
35 let _ = x.powf(-2_147_483_648.0);
36 let _ = x.powf(2_147_483_647.0);
37 // Cases where the lint shouldn't be applied
40 let _ = x.powf(-2_147_483_649.0);
41 let _ = x.powf(2_147_483_648.0);