f64.sqrt
Pops a f64 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

f64.sqrt

Stack In

f64 The value to find the square root of.

Stack Out

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

Examples

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

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

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

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

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