-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add lint to improve floating-point expressions #4897
New issue
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
Merged
bors
merged 14 commits into
rust-lang:master
from
krishna-veerareddy:issue-2040-accurate-float-functions
Feb 24, 2020
Merged
Changes from 1 commit
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
c636c6a
Add lints to detect inaccurate and inefficient FP operations
krishna-veerareddy 1f4f357
Consolidate the accuracy and efficiency lints
krishna-veerareddy 9520d3d
Suggest usage of `powi` method when applicable
krishna-veerareddy de79733
Lint expressions of the form `x.log(b) / y.log(b)`
krishna-veerareddy a60ae5d
Split test cases into separate files
krishna-veerareddy de07c84
Detect usage of `(x + 1).ln()` and suggest `x.ln_1p()` instead
krishna-veerareddy fd2506b
Add type suffixes to unsuffixed method receiver suggestions
krishna-veerareddy bc03f46
Remove lint for logarithm division identity
krishna-veerareddy 6dacb1a
Change lint name to `suboptimal_flops`
krishna-veerareddy bc706e3
Fix `powi` suggestion and add general improvements
krishna-veerareddy 454e505
Run rust-fix on tests
krishna-veerareddy 4065ca9
Move `manual_mul_add` into `suboptimal_flops` lint
krishna-veerareddy e94a167
Rename `mul_add` test file and add general improvements
krishna-veerareddy ff0d44e
Add `imprecise_flops` lint
krishna-veerareddy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Rename
mul_add
test file and add general improvements
- Loading branch information
commit e94a167508604d4f4d37bbd654fc3a39056ef99b
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
18 changes: 9 additions & 9 deletions
18
tests/ui/floating_point_fma.stderr → tests/ui/floating_point_mul_add.stderr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.