it worx
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user