Post Reply 
find the lowest common denominator
01-15-2018, 12:53 PM
Post: #2
RE: find the lowest common denominator
I'm not sure there is a build-in function providing the lowest common denominator.
So here is a small program doing that:

Code:
EXPORT LCD(N,M)
BEGIN
 LOCAL l:={};
 l:=INTERSECT(mat2list(idivis(N)),mat2list(idivis(M)));
 RETURN l(MIN(SIZE(l),2));
END;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: find the lowest common denominator - Didier Lachieze - 01-15-2018 12:53 PM



User(s) browsing this thread: 1 Guest(s)