f32.demote_f64
Pops an f64 value off the stack, converts it into a f32 value, and then pushes it back on to the stack.

Syntax

f32.demote_f64

Stack In

f64 The value to be converted.

Stack Out

f32 The f32 version of the f64 value.

Examples

;; Convert f64 3.142 into a f32 value
f64.const 3.142
f32.demote_f64

;; The stack contains a f32 value of 3.142
;; Convert f64 -2.718 into a f32 value
f64.const -2.718
f32.demote_f64

;; The stack contains a f32 value of -2.718