1 error: manual implementation of `abs` method
2 --> $DIR/floating_point_abs.rs:10:5
4 LL | if num >= 0.0 { num } else { -num }
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `num.abs()`
7 = note: `-D clippy::suboptimal-flops` implied by `-D warnings`
9 error: manual implementation of `abs` method
10 --> $DIR/floating_point_abs.rs:14:5
12 LL | if 0.0 < num { num } else { -num }
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `num.abs()`
15 error: manual implementation of `abs` method
16 --> $DIR/floating_point_abs.rs:18:5
18 LL | if a.a > 0.0 { a.a } else { -a.a }
19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `a.a.abs()`
21 error: manual implementation of `abs` method
22 --> $DIR/floating_point_abs.rs:22:5
24 LL | if 0.0 >= num { -num } else { num }
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `num.abs()`
27 error: manual implementation of `abs` method
28 --> $DIR/floating_point_abs.rs:26:5
30 LL | if a.a < 0.0 { -a.a } else { a.a }
31 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `a.a.abs()`
33 error: manual implementation of negation of `abs` method
34 --> $DIR/floating_point_abs.rs:30:5
36 LL | if num < 0.0 { num } else { -num }
37 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `-num.abs()`
39 error: manual implementation of negation of `abs` method
40 --> $DIR/floating_point_abs.rs:34:5
42 LL | if 0.0 >= num { num } else { -num }
43 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `-num.abs()`
45 error: manual implementation of negation of `abs` method
46 --> $DIR/floating_point_abs.rs:39:12
48 LL | a: if a.a >= 0.0 { -a.a } else { a.a },
49 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `-a.a.abs()`
51 error: aborting due to 8 previous errors