f32.sqrt
Pops a f32 value off the stack, works out the square root of it, and then pushes the result back on to the stack. If the value is negative then it will not throw an error, but it will set the value pushed onto the stack to NaN (not a number).

Syntax

f32.sqrt

Stack In

f32 The value to find the square root of.

Stack Out

f32 The square root value of the value given or NaN (not a number).

Examples

;; Push the f32 value 16 onto the stack
f32.const 16.0

;; Pop the f32 value off the stack, works out the square root value and
;; push the result back onto the stack
f32.sqrt

;; The stack contains an f32 value of 4.0
;; Push the f32 value -1 onto the stack
f32.const -1.0

;; Pop the f32 value off the stack, works out the square root value and
;; push the result back onto the stack
f32.sqrt

;; The stack contains an f32 value of NaN (not a number)