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);
14 let _ = (x as f32).powf(1.0 / 3.0);
17 let _ = x.powf(16_777_215.0);
18 let _ = x.powf(-16_777_215.0);
19 let _ = (x as f32).powf(-16_777_215.0);
20 let _ = (x as f32).powf(3.0);
21 // Cases where the lint shouldn't be applied
24 let _ = x.powf(16_777_216.0);
25 let _ = x.powf(-16_777_216.0);
29 let _ = 2f64.powf(3.1);
30 let _ = 2f64.powf(-3.1);
31 let _ = std::f64::consts::E.powf(x);
32 let _ = std::f64::consts::E.powf(3.1);
33 let _ = std::f64::consts::E.powf(-3.1);
34 let _ = x.powf(1.0 / 2.0);
35 let _ = x.powf(1.0 / 3.0);
38 let _ = x.powf(-2_147_483_648.0);
39 let _ = x.powf(2_147_483_647.0);
40 // Cases where the lint shouldn't be applied
43 let _ = x.powf(-2_147_483_649.0);
44 let _ = x.powf(2_147_483_648.0);