f32.abs
Pops a f32 value off the stack, works out the absolute value, and then
pushes the result back on to the stack. If the value is positive then that is the value
pushed onto the stack. If the value is negative then it is changed into a positive one, for
example, -3.142 become 3.142, and 2.718 stays as 2.718 (because it is already positive).
Stack In
| f32 |
The value to make absolute. |
Stack Out
| f32 |
The absolute value of the value given. This is always the positive version of the value. |
Examples
f32.const 3.142
f32.abs
f32.const -2.718
f32.abs