mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 10:42:36 +01:00
Fix intermediate truncation in vector FP fused multiply-add.
This commit is contained in:
parent
3eb3f66e96
commit
9a310c312e
@ -865,7 +865,7 @@ private:
|
||||
CPU.VPR[vd]._f[w] = (float)FPR_NAN;
|
||||
else
|
||||
{
|
||||
CPU.VPR[vd]._f[w] = a * c + b;
|
||||
CPU.VPR[vd]._f[w] = fmaf(a, c, b);
|
||||
if (std::isnan(CPU.VPR[vd]._f[w]))
|
||||
CPU.VPR[vd]._f[w] = (float)FPR_NAN;
|
||||
}
|
||||
@ -1288,7 +1288,7 @@ private:
|
||||
CPU.VPR[vd]._f[w] = (float)FPR_NAN;
|
||||
else
|
||||
{
|
||||
CPU.VPR[vd]._f[w] = -(a * c - b);
|
||||
CPU.VPR[vd]._f[w] = -fmaf(a, c, -b);
|
||||
if (std::isnan(CPU.VPR[vd]._f[w]))
|
||||
CPU.VPR[vd]._f[w] = (float)FPR_NAN;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user