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
Filter window calculation illegal calculation. #1348
Comments
|
Thanks for documenting/reporting this here 👍 For future readers: http://lists.gnu.org/archive/html/discuss-gnuradio/2017-06/msg00277.html |
|
Just to be clear: this is a serious bug in the way we do floating point math, and I (hopefully) have a patch coming up. We need to be vigilant, though – this is most likely not the only mistake of this type. |
|
marcusmueller
added a commit
to marcusmueller/gnuradio
that referenced
this issue
Jun 27, 2017
gnuradio#1348 We were doing floating point math wrong.
marcusmueller
added a commit
to marcusmueller/gnuradio
that referenced
this issue
Jun 27, 2017
gnuradio#1348 We were doing floating point math wrong.
marcusmueller
added a commit
to marcusmueller/gnuradio
that referenced
this issue
Jun 27, 2017
Mustn't do sqrt(1 - (1.0+epsilon)**2);
marcusmueller
added a commit
to marcusmueller/gnuradio
that referenced
this issue
Jun 27, 2017
gnuradio#1348 sqrt(x<0) yields NaN; to avoid a situation where a variable would be close to, but not necessarily exactly +-1, extracted the relevant floating point corner cases from the loop.
|
Is this fixed now (: ? |
|
This was fixed in #1349. Closing. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This bug get triggered on an "AMD FX(tm)-8150 Eight-Core Processor" when gnuradio is compiled with
CFLAGS="-march=native -O2".In window.cc line 265, with
i == ntaps - 1givestemp = 1.0000000000000000002that causesqrt (0)witch return "-nan" on the next line for the last value of the vector. This value get used for the gain calculation in the low_pass filter and thus screwing all the rest of the calculations.The text was updated successfully, but these errors were encountered: