2014-12-10, 18:06
I found while making my Debian 6 package for Kodi RC3 that the unit tests for fft try to compare for equality float numbers, and fail (for the last decimal or so). I think when comparing floating numbers some accuracy margin should be taken into account. I've made some simple searches on the forum but I haven't seen anything about this.
As a sample:
Testfft.cpp:283: Failure
Value of: varstr.c_str()
Actual: "8.778495"
Expected: refstr.c_str()
Which is: "8.778496"
We can argue that this difference is greater than 24-bit resolution, but no greater than 16-bit.
I'm not acquainted with this set of unit testing tools, but should it be easy to specify a comparison within 1/10000 (barely better than 16bit) or so? Right now I have disabled the two tests affected.
Regards
As a sample:
Testfft.cpp:283: Failure
Value of: varstr.c_str()
Actual: "8.778495"
Expected: refstr.c_str()
Which is: "8.778496"
We can argue that this difference is greater than 24-bit resolution, but no greater than 16-bit.
I'm not acquainted with this set of unit testing tools, but should it be easy to specify a comparison within 1/10000 (barely better than 16bit) or so? Right now I have disabled the two tests affected.
Regards