Files
pylib/pylib/mathematics.py

18 lines
363 B
Python

#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Mathematical functions.
:Date: 2019-10-30
.. module:: mathematics
:platform: *nix, Windows
:synopsis: Mathematical functions.
.. moduleauthor:: Daniel Weschke <daniel.weschke@directbox.de>
"""
from math import gcd
def lcm(a, b):
"""Compute the lowest common multiple of a and b"""
return a/gcd(a, b)*b