f64.abs
Pops a f64
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
f64 |
The value to make absolute. |
Stack Out
f64 |
The absolute value of the value given. This is always the positive version of the value. |
Examples
f64.const 3.142
f64.abs
f64.const -2.718
f64.abs