The test uses a relative tolerance, but the outputs are differences of two potentially large values. If the difference happens to be near zero, the test fails.
If the difference between two inputs happens to be close to bound or -bound (both of which represent a phase difference of 180 degrees), then a small floating point error can flip the sign of the output value, causing the test to fail.
To fix the first problem, I've switched the test to an absolute tolerance, and to fix the second I've increased the bound to 2.0. After these changes, the test passes reliably on i386.
volk_32fc_s32f_magnitude_16i
fails in i386 Debian CI and locally:There are two bugs:
bound
or-bound
(both of which represent a phase difference of 180 degrees), then a small floating point error can flip the sign of the output value, causing the test to fail.To fix the first problem, I've switched the test to an absolute tolerance, and to fix the second I've increased the bound to 2.0. After these changes, the test passes reliably on i386.