This commit is contained in:
2017-08-09 15:03:00 -04:00
parent f168f8755a
commit 436005dc68
2 changed files with 6 additions and 6 deletions

View File

@@ -29,7 +29,6 @@ silleee shift_and_round(int val, int bits) {
}
silleee silleee_add(silleee x, silleee y) {
silleee dest = 0;
int dexp;
long unsigned dmant;
int dsign;
@@ -57,8 +56,9 @@ silleee silleee_add(silleee x, silleee y) {
dexp = yexp;
if (yexp > xexp) xmant = shift_and_round(xmant, yexp-xexp);
else if (yexp < xexp) {
if (yexp > xexp) {
xmant = shift_and_round(xmant, yexp-xexp);
} else if (yexp < xexp) {
ymant = shift_and_round(ymant, xexp-yexp);
dexp = xexp;
}
@@ -81,7 +81,7 @@ silleee silleee_add(silleee x, silleee y) {
++dexp;
} else {
if (dmant) {
while (dmant < 0x800000 && dexp > -127) {
while ((dmant < 0x800000) && (dexp > -127)) {
dmant <<= 1;
--dexp;
}