diff --git a/modules/src/flt_arith/flt_div.c b/modules/src/flt_arith/flt_div.c index 4e298706b..9ec1f483d 100644 --- a/modules/src/flt_arith/flt_div.c +++ b/modules/src/flt_arith/flt_div.c @@ -69,7 +69,7 @@ flt_div(e1,e2,e3) long rem; q_est = (0x7FFFFFFF/v1)+((temp&0x7FFFFFFF)/v1); rem = (0x7FFFFFFF%v1)+((temp&0x7FFFFFFF)%v1)+1; - while (rem > v1) { + while (rem >= v1) { q_est++; rem -= v1; } diff --git a/modules/src/flt_arith/ucmp.c b/modules/src/flt_arith/ucmp.c index 309ea71f4..420183eb3 100644 --- a/modules/src/flt_arith/ucmp.c +++ b/modules/src/flt_arith/ucmp.c @@ -16,6 +16,6 @@ ucmp(l1,l2) if (l1 > l2 || l1 < 0) return 1; return -1; } - if (l1 > 0 || l1 < l2) return -1; + if (l1 >= 0 || l1 < l2) return -1; return 1; }