style: include IM_BAD_CHECK_FOR_ODD
(#5213)
This commit is contained in:
parent
3ecd13508a
commit
f8698674b3
@ -65,9 +65,6 @@
|
||||
<Match>
|
||||
<Bug pattern="MS_EXPOSE_REP" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="IM_BAD_CHECK_FOR_ODD" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="DM_BOXED_PRIMITIVE_FOR_PARSING" />
|
||||
</Match>
|
||||
|
@ -63,7 +63,7 @@ public class SimpsonIntegration {
|
||||
if (i == 0 || i == data.size() - 1) {
|
||||
integralEvaluation += data.get(i);
|
||||
System.out.println("Multiply f(x" + i + ") by 1");
|
||||
} else if (i % 2 == 1) {
|
||||
} else if (i % 2 != 0) {
|
||||
integralEvaluation += (double) 4 * data.get(i);
|
||||
System.out.println("Multiply f(x" + i + ") by 4");
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user