Result is floor(Number)which should be preferred for portability.
This operation works on all numeric types. The result value is the largest integral value that is smaller that Number (rounding down towards minus infinity).
The result type is the same as the argument type. To convert the type to integer, use integer/2.
In coroutining mode, if Number is uninstantiated, the call to floor/2 is delayed until this variable is instantiated.
Success: floor(1.8, 1.0). floor(-1.8, -2.0). floor(5, 5). floor(-6.4, Result). (gives Result = -7.0) Fail: floor(1.0, 0.0). floor(0.5, 0). floor(1, r). Error: floor(A, 6.0). (Error 4). floor(4 + 2.3, 6.0). (Error 24).