f32.neg
Pops a f32 value off the stack, negates the value, and then pushes the result back on to the stack. This turns a positive value into a negative one, and turns a negative value into a positive one.

Syntax

f32.neg

Stack In

f32 The value to negate.

Stack Out

f32 The negated value.

Examples

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

;; Pop the f32 value off the stack, negate the value and
;; push the result back onto the stack
f32.neg

;; The stack contains an f32 value of -3.142
;; Push the f32 value -2.718 onto the stack
f32.const -2.718

;; Pop the f32 value off the stack, negate the value and
;; push the result back onto the stack
f32.neg

;; The stack contains an f32 value of 2.718