diff --git a/libsrc/core/simd_generic.hpp b/libsrc/core/simd_generic.hpp index 027b0f14..4fc47c33 100644 --- a/libsrc/core/simd_generic.hpp +++ b/libsrc/core/simd_generic.hpp @@ -338,7 +338,7 @@ namespace ngcore template NETGEN_INLINE SIMD operator- (SIMD a, SIMD b) { if constexpr(N==1) return a.Data()-b.Data(); - else return { a.Lo()-b.Lo(), a.Hi()+b.Hi() }; + else return { a.Lo()-b.Lo(), a.Hi()-b.Hi() }; } template NETGEN_INLINE SIMD operator- (SIMD a) { @@ -349,13 +349,13 @@ namespace ngcore template NETGEN_INLINE SIMD operator* (SIMD a, SIMD b) { if constexpr(N==1) return a.Data()*b.Data(); - else return { a.Lo()*b.Lo(), a.Hi()+b.Hi() }; + else return { a.Lo()*b.Lo(), a.Hi()*b.Hi() }; } template NETGEN_INLINE SIMD operator/ (SIMD a, SIMD b) { if constexpr(N==1) return a.Data()/b.Data(); - else return { a.Lo()/b.Lo(), a.Hi()+b.Hi() }; + else return { a.Lo()/b.Lo(), a.Hi()/b.Hi() }; } template