Next: , Previous: , Up: Numbers   [Contents][Index]


5.4.5 Integer Functions

The functions described in this section all operate on, and return, integer values.

Function: quotient dividend divisor

Return the integer part of dividing dividend by divisor.

Function: remainder dividend divisor

Returns the integer remainder from dividing the dividend by divisor. The remainder is either zero or has the same sign as dividend.

Function: modulo dividend divisor
Function: mod dividend divisor

Return the value of dividend modulo divisor. Unlike the remainder function the modulo function always has the sign of the divisor, not of the dividend

Function: gcd args…

Returns the greatest common divisor of the integers args… If no arguments are given, returns zero.

Function: lcm args…

Return the lowest common multiple of the integers args… If no arguments are given, returns one.