mirror of
https://github.com/open-simh/simh.git
synced 2026-01-11 23:53:30 +00:00
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
@ -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…
x
Reference in New Issue
Block a user