From 1d4a1b6de6575ae1e76729f6395480788f8a2ead Mon Sep 17 00:00:00 2001 From: Christophe Favergeon Date: Mon, 11 Mar 2024 09:39:47 +0100 Subject: [PATCH] Correct issue #165 --- Source/FastMathFunctions/arm_divide_q15.c | 2 +- Source/FastMathFunctions/arm_divide_q31.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/FastMathFunctions/arm_divide_q15.c b/Source/FastMathFunctions/arm_divide_q15.c index d087614df..cd57a43c2 100755 --- a/Source/FastMathFunctions/arm_divide_q15.c +++ b/Source/FastMathFunctions/arm_divide_q15.c @@ -68,7 +68,7 @@ arm_status arm_divide_q15(q15_t numerator, *shift = 0; - sign = (numerator>>15) ^ (denominator>>15); + sign = (numerator<0) ^ (denominator<0); if (denominator == 0) { diff --git a/Source/FastMathFunctions/arm_divide_q31.c b/Source/FastMathFunctions/arm_divide_q31.c index 6397e32f2..eeed6fbf7 100755 --- a/Source/FastMathFunctions/arm_divide_q31.c +++ b/Source/FastMathFunctions/arm_divide_q31.c @@ -63,7 +63,7 @@ arm_status arm_divide_q31(q31_t numerator, *shift = 0; - sign = (numerator>>31) ^ (denominator>>31); + sign = (numerator<0) ^ (denominator<0); if (denominator == 0) {