1 // run-rustfix
2 #![warn(clippy::imprecise_flops)]
3 
main()4 fn main() {
5     let x = 2f32;
6     let _ = x.exp() - 1.0;
7     let _ = x.exp() - 1.0 + 2.0;
8     // Cases where the lint shouldn't be applied
9     let _ = x.exp() - 2.0;
10     let _ = x.exp() - 1.0 * 2.0;
11 
12     let x = 2f64;
13     let _ = x.exp() - 1.0;
14     let _ = x.exp() - 1.0 + 2.0;
15     // Cases where the lint shouldn't be applied
16     let _ = x.exp() - 2.0;
17     let _ = x.exp() - 1.0 * 2.0;
18 }
19