Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void av_build_filter(....)
- {
- ....
- x = M_PI * ((double)(i - center) -
- (double)ph / phase_count) * factor;
- if (x == 0) y = 1.0;
- else y = sin(x) / x;
- ....
- }
- It's strange to expect 'x' to exactly equal 0 after all these calculations.
- This suspicious code was found in ffdshow project by PVS-Studio static code analyzer.
- Warning message is:
- V550 An odd precise comparison: x == 0. It's probably better to use a comparison with defined precision: fabs(A - B) < Epsilon. resample2.cpp 166
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment