5.111 · exercise
Predict: floating point
Trace single and double precision arithmetic by hand: add, fused multiply-add, multiply-negate, and the two instructions that change only the sign. Every answer is the exact decimal value left in the destination register.
0 of 5 correct
Predict the result
// s1 holds 2.5 // s2 holds 3.5 fadd s0, s1, s2
Predict the result
// d1 holds 2.0 // d2 holds 3.0 // d3 holds 10.0 fmadd d0, d1, d2, d3
Predict the result
// d1 holds -42.5 fabs d0, d1
Predict the result
// s1 holds 15.0 fneg s0, s1
Predict the result
// s1 holds 2.0 // s2 holds 4.0 fnmul s0, s1, s2