We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clippy suggests incorrect expression:
warning: consider using mul_add() for better numerical precision --> src/jarowinkler.rs:68:9 | 68 | j + 0.1 * p * (1.0 - j) | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `0.1 * p.mul_add((1.0 - j), j)` | = note: `#[warn(clippy::manual_mul_add)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_mul_add
Isn't suggested expression 0.1 * p.mul_add((1.0 - j), j) equivalent to:
0.1 * p.mul_add((1.0 - j), j)
0.1 * (p * (1.0 - j) + j)
which is not equivalent to original formula.
Perhaps it should suggest:
(0.1 * p).mul_add((1.0 - j), j)
Additional info:
$ cargo clippy --version clippy 0.0.212 (8ab24d7 2019-10-24)
The text was updated successfully, but these errors were encountered:
Duplicate of #4735
Sorry, something went wrong.
We also moved it to nursery, so it is allow-by-default with the next nightly
Thanks
clippy::suboptimal_flops
No branches or pull requests
clippy suggests incorrect expression:
Isn't suggested expression
0.1 * p.mul_add((1.0 - j), j)
equivalent to:which is not equivalent to original formula.
Perhaps it should suggest:
Additional info:
The text was updated successfully, but these errors were encountered: