[racket-dev] feature request: gcd, lcm for rationals

From: David Van Horn (dvanhorn at ccs.neu.edu)
Date: Wed Dec 14 08:01:31 EST 2011

On 12/14/11 5:11 AM, Marijn wrote:
>> (gcd-rational 2/3 2/3 2/3)
> 2/3
>> (lcm-rational 2/3 2/3 2/3)
> 4/9
>
> is that 4/9 the intended result?

No, I must've messed up the definition.  Fortunately, Matthew did the 
right thing when he implemented lcm:

Welcome to Racket v5.2.0.6.
 > (lcm 2/3 2/3 2/3)
2/3

David



Posted on the dev mailing list.