Please enable JavaScript to view this site.

Function that returns the integer part of its argument.

Syntax

i32 trunc (real value)

value

Value or expression from which to get the integer part

result

Returns the integer part of the argument

Validity

Rule, Task

Note

Always returns a value approximating the integer less than or equal to the input value (e.g. 5.3 -> 5, 5.8 -> 5, -5.3 -> -6, ..)

 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC