Skip to content

Commit 1d4a1b6

Browse files
Correct issue ARM-software#165
1 parent 77b7b09 commit 1d4a1b6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Source/FastMathFunctions/arm_divide_q15.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ arm_status arm_divide_q15(q15_t numerator,
6868

6969
*shift = 0;
7070

71-
sign = (numerator>>15) ^ (denominator>>15);
71+
sign = (numerator<0) ^ (denominator<0);
7272

7373
if (denominator == 0)
7474
{

Source/FastMathFunctions/arm_divide_q31.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ arm_status arm_divide_q31(q31_t numerator,
6363

6464
*shift = 0;
6565

66-
sign = (numerator>>31) ^ (denominator>>31);
66+
sign = (numerator<0) ^ (denominator<0);
6767

6868
if (denominator == 0)
6969
{

0 commit comments

Comments
 (0)