From: Rob Biedenharn Date: 2008-02-16T04:15:05+09:00 Subject: Re: Finding smallest integer division? On Feb 15, 2008, at 1:49 PM, Jari Williamsson wrote: > In Ruby, what would be the most efficient way to find the smallest > number that an array of different numbers can be divided by with > integer math? > > For example: > [1,2] would return 2 > [1,2,3] would return 6 > [1,2,4] would return 4 > [1,2,3,4] would return 12 > > > Best regards, > > Jari Williamsson Ask Google about "least common multiple" -Rob Rob Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com