i32.reinterpret_f32
Pops a f32 value off the stack, keeping its binary form, pushes it onto the stack as an i32 value.
The binary structure of a f32 value is copied as it is, not its value, into an i32 value.
This is like copying the floating point value into memory and then reading it with an integer.
The binary bits are the same, however the numeric value is totally different.
Syntax
i32.reinterpret_f32
Stack In
| f32 |
The value to be transferred. |
Stack Out
| i32 |
The i32 binary copy of the f32 value. |
Example
f32.const 1234.567
i32.reinterpret_f32
f32.reinterpret_i32