rust/tests/ui/floating_point_log.stderr

173 lines
6.0 KiB
Plaintext
Raw Normal View History

error: logarithm for bases 2, 10 and e can be computed more accurately
2019-12-21 01:57:47 +00:00
--> $DIR/floating_point_log.rs:9:13
|
LL | let _ = x.log(2f32);
| ^^^^^^^^^^^ help: consider using: `x.log2()`
|
= note: `-D clippy::floating-point-improvements` implied by `-D warnings`
error: logarithm for bases 2, 10 and e can be computed more accurately
2019-12-21 01:57:47 +00:00
--> $DIR/floating_point_log.rs:10:13
|
LL | let _ = x.log(10f32);
| ^^^^^^^^^^^^ help: consider using: `x.log10()`
error: logarithm for bases 2, 10 and e can be computed more accurately
2019-12-21 01:57:47 +00:00
--> $DIR/floating_point_log.rs:11:13
|
LL | let _ = x.log(std::f32::consts::E);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.ln()`
error: logarithm for bases 2, 10 and e can be computed more accurately
2019-12-21 01:57:47 +00:00
--> $DIR/floating_point_log.rs:12:13
|
LL | let _ = x.log(TWO);
| ^^^^^^^^^^ help: consider using: `x.log2()`
error: logarithm for bases 2, 10 and e can be computed more accurately
2019-12-21 01:57:47 +00:00
--> $DIR/floating_point_log.rs:13:13
|
LL | let _ = x.log(E);
| ^^^^^^^^ help: consider using: `x.ln()`
error: logarithm for bases 2, 10 and e can be computed more accurately
2019-12-21 01:57:47 +00:00
--> $DIR/floating_point_log.rs:16:13
|
LL | let _ = x.log(2f64);
| ^^^^^^^^^^^ help: consider using: `x.log2()`
error: logarithm for bases 2, 10 and e can be computed more accurately
2019-12-21 01:57:47 +00:00
--> $DIR/floating_point_log.rs:17:13
|
LL | let _ = x.log(10f64);
| ^^^^^^^^^^^^ help: consider using: `x.log10()`
error: logarithm for bases 2, 10 and e can be computed more accurately
2019-12-21 01:57:47 +00:00
--> $DIR/floating_point_log.rs:18:13
|
LL | let _ = x.log(std::f64::consts::E);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.ln()`
error: ln(1 + x) can be computed more accurately
2019-12-21 01:57:47 +00:00
--> $DIR/floating_point_log.rs:23:13
|
LL | let _ = (1.0 + x).ln();
| ^^^^^^^^^^^^^^ help: consider using: `x.ln_1p()`
error: ln(1 + x) can be computed more accurately
2019-12-21 01:57:47 +00:00
--> $DIR/floating_point_log.rs:24:13
|
LL | let _ = (1.0 + x * 2.0).ln();
| ^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x * 2.0).ln_1p()`
error: ln(1 + x) can be computed more accurately
2019-12-21 01:57:47 +00:00
--> $DIR/floating_point_log.rs:25:13
|
LL | let _ = (1.0 + x.powi(2)).ln();
| ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.powi(2).ln_1p()`
error: ln(1 + x) can be computed more accurately
2019-12-21 01:57:47 +00:00
--> $DIR/floating_point_log.rs:26:13
|
LL | let _ = (1.0 + x.powi(2) * 2.0).ln();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x.powi(2) * 2.0).ln_1p()`
error: ln(1 + x) can be computed more accurately
2019-12-21 01:57:47 +00:00
--> $DIR/floating_point_log.rs:27:13
|
LL | let _ = (1.0 + (std::f32::consts::E - 1.0)).ln();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `((std::f32::consts::E - 1.0)).ln_1p()`
error: ln(1 + x) can be computed more accurately
2019-12-21 01:57:47 +00:00
--> $DIR/floating_point_log.rs:34:13
|
LL | let _ = (1.0 + x).ln();
| ^^^^^^^^^^^^^^ help: consider using: `x.ln_1p()`
error: ln(1 + x) can be computed more accurately
2019-12-21 01:57:47 +00:00
--> $DIR/floating_point_log.rs:35:13
|
LL | let _ = (1.0 + x * 2.0).ln();
| ^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x * 2.0).ln_1p()`
error: ln(1 + x) can be computed more accurately
2019-12-21 01:57:47 +00:00
--> $DIR/floating_point_log.rs:36:13
|
LL | let _ = (1.0 + x.powi(2)).ln();
| ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.powi(2).ln_1p()`
error: x.log(b) / y.log(b) can be reduced to x.log(y)
2019-12-21 01:57:47 +00:00
--> $DIR/floating_point_log.rs:48:13
|
LL | let _ = x.log2() / y.log2();
| ^^^^^^^^^^^^^^^^^^^ help: consider using: `x.log(y)`
error: x.log(b) / y.log(b) can be reduced to x.log(y)
2019-12-21 01:57:47 +00:00
--> $DIR/floating_point_log.rs:49:13
|
LL | let _ = x.log10() / y.log10();
| ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.log(y)`
error: x.log(b) / y.log(b) can be reduced to x.log(y)
2019-12-21 01:57:47 +00:00
--> $DIR/floating_point_log.rs:50:13
|
LL | let _ = x.ln() / y.ln();
| ^^^^^^^^^^^^^^^ help: consider using: `x.log(y)`
error: x.log(b) / y.log(b) can be reduced to x.log(y)
2019-12-21 01:57:47 +00:00
--> $DIR/floating_point_log.rs:51:13
|
LL | let _ = x.log(4.0) / y.log(4.0);
| ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.log(y)`
error: x.log(b) / y.log(b) can be reduced to x.log(y)
2019-12-21 01:57:47 +00:00
--> $DIR/floating_point_log.rs:52:13
|
LL | let _ = x.log(b) / y.log(b);
| ^^^^^^^^^^^^^^^^^^^ help: consider using: `x.log(y)`
error: x.log(b) / y.log(b) can be reduced to x.log(y)
2019-12-21 01:57:47 +00:00
--> $DIR/floating_point_log.rs:54:13
|
LL | let _ = x.log(b) / 2f32.log(b);
| ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.log2()`
error: x.log(b) / y.log(b) can be reduced to x.log(y)
2019-12-21 01:57:47 +00:00
--> $DIR/floating_point_log.rs:60:13
|
LL | let _ = x.log2() / y.log2();
| ^^^^^^^^^^^^^^^^^^^ help: consider using: `x.log(y)`
error: x.log(b) / y.log(b) can be reduced to x.log(y)
2019-12-21 01:57:47 +00:00
--> $DIR/floating_point_log.rs:61:13
|
LL | let _ = x.log10() / y.log10();
| ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.log(y)`
error: x.log(b) / y.log(b) can be reduced to x.log(y)
2019-12-21 01:57:47 +00:00
--> $DIR/floating_point_log.rs:62:13
|
LL | let _ = x.ln() / y.ln();
| ^^^^^^^^^^^^^^^ help: consider using: `x.log(y)`
error: x.log(b) / y.log(b) can be reduced to x.log(y)
2019-12-21 01:57:47 +00:00
--> $DIR/floating_point_log.rs:63:13
|
LL | let _ = x.log(4.0) / y.log(4.0);
| ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.log(y)`
error: x.log(b) / y.log(b) can be reduced to x.log(y)
2019-12-21 01:57:47 +00:00
--> $DIR/floating_point_log.rs:64:13
|
LL | let _ = x.log(b) / y.log(b);
| ^^^^^^^^^^^^^^^^^^^ help: consider using: `x.log(y)`
error: x.log(b) / y.log(b) can be reduced to x.log(y)
2019-12-21 01:57:47 +00:00
--> $DIR/floating_point_log.rs:66:13
|
LL | let _ = x.log(b) / 2f64.log(b);
| ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.log2()`
2019-12-21 01:57:47 +00:00
error: aborting due to 28 previous errors