forked from OSchip/llvm-project
parent
a7faa5b92a
commit
7193d9fa95
|
@ -2,8 +2,10 @@ misc-incorrect-roundings
|
|||
========================
|
||||
|
||||
Checks the usage of patterns known to produce incorrect rounding.
|
||||
Programmers often use
|
||||
Programmers often use::
|
||||
|
||||
(int)(double_expression + 0.5)
|
||||
|
||||
to round the double expression to an integer. The problem with this:
|
||||
|
||||
1. It is unnecessarily slow.
|
||||
|
|
Loading…
Reference in New Issue