how to specify number of decimals float elixir code example Example: how to floor a value elixir iex> trunc(2.3) 2 iex> trunc(-2.3) -2