Commit 92f2ad0a authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

trying to fix test failures (take 2)

parent 17675b4c
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
#include <algorithm> #include <algorithm>
#include <cmath> #include <cmath>
#include <float.h>
#include <stdlib.h> #include <stdlib.h>
#define OPENCV_HAL_ADD(a, b) ((a) + (b)) #define OPENCV_HAL_ADD(a, b) ((a) + (b))
...@@ -2286,9 +2287,10 @@ inline v_float32x4 operator ~ (const v_float32x4& a) ...@@ -2286,9 +2287,10 @@ inline v_float32x4 operator ~ (const v_float32x4& a)
inline v_float32x4 v_sqrt(const v_float32x4& x) inline v_float32x4 v_sqrt(const v_float32x4& x)
{ {
float32x4_t e = vrsqrteq_f32(x.val); float32x4_t x1 = vmaxq_f32(x.val, vdupq_n_f32(FLT_MIN));
e = vmulq_f32(vrsqrtsq_f32(vmulq_f32(x.val, e), e), e); float32x4_t e = vrsqrteq_f32(x1);
e = vmulq_f32(vrsqrtsq_f32(vmulq_f32(x.val, e), e), e); e = vmulq_f32(vrsqrtsq_f32(vmulq_f32(x1, e), e), e);
e = vmulq_f32(vrsqrtsq_f32(vmulq_f32(x1, e), e), e);
return v_float32x4(vmulq_f32(x.val, e)); return v_float32x4(vmulq_f32(x.val, e));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment