mirror of
https://github.com/freebsd/freebsd-src
synced 2024-11-05 18:22:52 +00:00
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:
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
|
@ -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--)
|
||||
{
|
||||
|
|
|
@ -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 ();
|
||||
|
||||
|
|
Loading…
Reference in a new issue