Fixed a multiplication bug in new multiplier

This commit is contained in:
Yousef Khadadeh 2025-08-04 12:02:29 +03:00
parent c5b9187216
commit b08c73ddf1
2 changed files with 4 additions and 11 deletions

View file

@ -459,10 +459,7 @@ namespace FixedPoint {
return Multiplier(val * a.val, false);
}
else if(isReciprocal && !a.isReciprocal) {
if(abs(val) < abs(a.val))
return Multiplier(a.val / val, false);
else
return Multiplier(val / a.val, true);
return Multiplier(val * a.val, true);
}
else {
if(abs(val) < abs(a.val))