BESM6: Fixed a bug in multiplication.
Multiplying a negative number by a zero value with a non-zero exponent produced wrong results.
This commit is contained in:
parent
5ab1fd6263
commit
c70a1ba3df
1 changed files with 1 additions and 1 deletions
|
@ -364,7 +364,7 @@ void besm6_multiply (t_value val)
|
|||
|
||||
acc.mantissa = l + ahi * bhi;
|
||||
|
||||
if (neg) {
|
||||
if (neg && (acc.mantissa || mr)) {
|
||||
mr = (~mr & BITS40) + 1;
|
||||
acc.mantissa = ((~acc.mantissa & BITS40) + (mr >> 40))
|
||||
| BIT41 | BIT42;
|
||||
|
|
Loading…
Add table
Reference in a new issue