Table of Contents

Mathematics - (Divisor|Denominator)

About

The divisor is an element of a division operation.

<math> \frac{\displaystyle dividend}{\displaystyle divisor} = quotient </math>

Theorem

If d is a divisor of N then N/d is also a divisor of N.

Type

Trivial

If d is a divisor of N, d is trivial if its value is 1 or N.

Greatest common

Euclid's algorithm for greatest common divisor. This algorithm that dates back some 2300 years is attributed to Euclid, and is very fast.

def gcd(x,y): return x if y == 0 else gcd(y, x % y)