fnmsub
Floating Negative Multiply-Subtract
-(A*C - B)
Details
The fnmsub instruction performs a floating-point multiply-subtract operation. It multiplies the values in registers FRA and FRC, then subtracts the value in register FRB from the result of the multiplication. The final result is rounded to the target precision and placed into register FRT.
Pseudocode Operation
FRT ← [(FRA) × (FRC)] - (FRB)
Programming Note
The fnmsub instruction is commonly used in scenarios requiring efficient floating-point arithmetic operations, such as in scientific computations or graphics processing. Ensure that the input registers FRA, FRC, and FRB are properly aligned to avoid precision loss. Be aware of potential exceptions like underflow or overflow, which can be managed by checking the FPSCR register after execution.
Example
Encoding
Operands
-
FRT
Target -
FRA
A -
FRC
C -
FRB
B