fixes: ucmp did not quite work right, flt_div had an obscure bug

This commit is contained in:
ceriel 1989-11-13 12:54:33 +00:00
parent 12669d882f
commit c30769327b
2 changed files with 2 additions and 2 deletions

View file

@ -69,7 +69,7 @@ flt_div(e1,e2,e3)
long rem; long rem;
q_est = (0x7FFFFFFF/v1)+((temp&0x7FFFFFFF)/v1); q_est = (0x7FFFFFFF/v1)+((temp&0x7FFFFFFF)/v1);
rem = (0x7FFFFFFF%v1)+((temp&0x7FFFFFFF)%v1)+1; rem = (0x7FFFFFFF%v1)+((temp&0x7FFFFFFF)%v1)+1;
while (rem > v1) { while (rem >= v1) {
q_est++; q_est++;
rem -= v1; rem -= v1;
} }

View file

@ -16,6 +16,6 @@ ucmp(l1,l2)
if (l1 > l2 || l1 < 0) return 1; if (l1 > l2 || l1 < 0) return 1;
return -1; return -1;
} }
if (l1 > 0 || l1 < l2) return -1; if (l1 >= 0 || l1 < l2) return -1;
return 1; return 1;
} }