Truncate (float to float)
trunc instructions, short for truncate, are used for getting the value of a number without its fractional part.
trunc differs from
floor when used on negative numbers,
floor will round down in those cases while
trunc will round up.
trunc instruction that truncates the fractional part of a floating point and converts it to an integer.
;; load a number onto the stack f32.const 2.7 ;; discard the fractional part (.7) f32.trunc ;; the top item on the stack will now be 2