bc.divmod

Division and remainder

Prototype

n = bc.divmod (a, b)

Description

Returns a / b, and the remainder (a % b).

If b is zero, returns nil.

For example:

print (bc.divmod (7, 3))  -->  2 1

Lua functions

Topics