Throw out the abort call, the reasoning seems to be false :-).

Change a round to a truncate. Problem reported from Christoph Kukulies:
9.8 2 / p did an IOT trap.
There is one remaining problem.: 9.8 2 % p shows on other machines 1.8
but does here in the moment 1.
This commit is contained in:
Andreas Schulz 1994-12-03 16:32:02 +00:00
parent e28b57d51b
commit d025cfd6c5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=4933
2 changed files with 4 additions and 4 deletions

View file

@ -119,7 +119,7 @@ decimal_copy_1 (b, digits)
return result;
}
else
return decimal_round_digits (b, digits);
return decimal_trunc_digits (b, digits);
}
/* flush specified number `digits' of trailing fraction digits,
@ -858,8 +858,8 @@ decimal_div (b1, b2, digits)
return decimal_copy (DECIMAL_ZERO);
}
if (lengthr <= (length1 - length2))
abort(); /* My reasoning says this cannot happen, I hope */
/* if (lengthr <= (length1 - length2))
abort(); */ /* My reasoning says this cannot happen, I hope */
for (i = length1 - length2; i >= 0; i--)
{

View file

@ -84,7 +84,7 @@ typedef struct decimal *decimal;
decimal decimal_add (), decimal_sub (), decimal_mul (), decimal_div ();
decimal decimal_mul_dc (), decimal_mul_rounded (), decimal_rem ();
decimal decimal_round_digits ();
decimal decimal_round_digits (), decimal_trunc_digits ();
decimal make_decimal (), decimal_copy (), decimal_parse ();
decimal decimal_sqrt (), decimal_expt ();