Integer.floor_div

You're seeing just the function floor_div, go back to Integer module for more information.
Link to this function

floor_div(dividend, divisor)

View Source (since 1.4.0)

Specs

floor_div(integer(), neg_integer() | pos_integer()) :: integer()

Performs a floored integer division.

Raises an ArithmeticError exception if one of the arguments is not an integer, or when the divisor is 0.

Integer.floor_div/2 performs floored integer division. This means that the result is always rounded towards negative infinity.

If you want to perform truncated integer division (rounding towards zero), use Kernel.div/2 instead.

Examples

iex> Integer.floor_div(5, 2)
2
iex> Integer.floor_div(6, -4)
-2
iex> Integer.floor_div(-99, 2)
-50