mirror of
https://github.com/simh/simh.git
synced 2026-03-06 11:13:29 +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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user