zscilib icon indicating copy to clipboard operation
zscilib copied to clipboard

vectors: function zsl_vec_zte, missing (-) in if statement

Open ruehlchris opened this issue 1 year ago • 0 comments

https://github.com/zephyrproject-rtos/zscilib/blob/0035be5e6a45e4ab89755b176d305d7a877fc79c/src/vectors.c#L375

the logic check for the right hand side never match because it check for x <= 0.0 && x > epsilon. correction x<=0.0 && x > (-) epsilon.

if ((v->data[g - x] >= 0.0 && v->data[g - x] < epsilon) || (v->data[g - x] <= 0.0 && v->data[g - x] > -epsilon)) {

ruehlchris avatar Jan 25 '23 02:01 ruehlchris