How is FNMADD.D different from FMUL plus add/subtract?
The fused instruction performs one final rounding; two separate instructions round the product first and then round the add/subtract result.
Double-precision negated fused multiply-add: rd = -(rs1 * rs2) - rs3, rounded once.
FNMADD.D uses the R4 four-register format for double-precision negated fused multiply-add. The multiply and add/subtract are fused, so the exact intermediate result is rounded only once at the end according to rm before being written to rd.
FNMADD.D's key property is fusion: the product and add/subtract term are not written as an intermediate result and are rounded once at the final step.
Understand this scenario with real code like «fnmadd.d f0, f1, f2, f3 # f0 = -(f1*f2)-f3».
Understand this scenario with real code like «fnmadd.d f0, f1, f2, f3 # f0 = -(f1*f2)-f3».
The fused instruction performs one final rounding; two separate instructions round the product first and then round the add/subtract result.
It needs rd, rs1, rs2, and rs3 register fields for the two multiply sources and the add/subtract term.