zscilib
zscilib copied to clipboard
vectors: if statement always true
https://github.com/zephyrproject-rtos/zscilib/blob/0035be5e6a45e4ab89755b176d305d7a877fc79c/src/vectors.c#L487
The if statement will return always true if (x>=1E-5 || x<=1E-5) and as no logical effect
the correct code might be: if (v->data[j] >= 1E-5 || v->data[j] <= -1E-5) to ensure v->data[j] is not smaller then the epsilon range.