[issue19237] Proposal : LCM function to complement GCD

CliffM report at bugs.python.org
Sat Oct 12 23:39:45 CEST 2013


New submission from CliffM:

While implementing a Least-Common-Multiple function (LCM), I noticed that although python has a Greatest-Common-Divisor (GCD) function in the fractions module, the LCM, its counterpart is not there.

I've attached a patch which implements and tests LCM in the fractions module. 

It would really need documentation, but maybe GCD and LCD should be moved to the math module first ?

----------
components: Extension Modules
files: lcm.patch
keywords: patch
messages: 199624
nosy: CliffM
priority: normal
severity: normal
status: open
title: Proposal : LCM function to complement GCD
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file32068/lcm.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19237>
_______________________________________


More information about the Python-bugs-list mailing list