f32
values off the stack, subtracts the second value from the first, and then
pushes the result back on to the stack. Make sure you push the values onto the stack in the correct
order otherwise you will be subtracting the wrong way round.
f32.sub
f32 | The first value to be subtract from. |
f32 | The second value to subtract by. |
f32 | The result of subtracting the second value from the first. |
;; Push the f32 value 3.142 onto the stack f32.const 3.142 ;; Push the f32 value 2.718 onto the stack f32.const 2.718 ;; Pop the two f32 values off the stack, subtract the second value ;; from the first and push the result back onto the stack f32.sub ;; The stack contains an f32 value of 0.424