f32.add
Pops two f32 values off the stack, adds them together, and then pushes the result back on to the stack.
$result = $first + $second

Syntax

f32.add

Stack In

f32 The first value to be added.
f32 The second value to be added.

Stack Out

f32 The result of adding the first and second values together.

Examples

;; 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, add them together and
;; push the result back onto the stack
f32.add

;; The stack contains an f32 value of 5.86
;; Push the f32 value -12.34 onto the stack
f32.const -12.34

;; Push the f32 value 19.44 onto the stack
f32.const 19.44

;; Pop the two f32 values off the stack, add them together and
;; push the result back onto the stack
f32.add

;; The stack contains an f32 value of -12.34 + 19.44 = 7.1