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

From: David Van Horn (dvanhorn at ccs.neu.edu)
Date: Sat Dec 10 09:25:42 EST 2011

On 12/9/11 3:31 PM, Daniel King wrote:
> On Fri, Dec 9, 2011 at 15:27, Carl Eastlund<cce at ccs.neu.edu>  wrote:
>> What does "divides" even mean in Q?  I think we need David to explain
>> what his extension of GCD and LCM means here, in that "divisors" and
>> "multiples" are fairly trivial things in Q.

I took "x divides y" to mean x/y is an integer.

> I don't suppose to understand all the math on this page, but I think
> it uses the same definition that dvh is using.
>
> http://mathworld.wolfram.com/GreatestCommonDivisor.html

Yes, that's where I got the definition I suggested.

As a concrete example of why I wanted gcd extended to rationals: I wrote 
a big-bang program that runs a set of big-bang programs, so it needs a 
tick-rate that is the gcd of all the tick-rates of the programs it runs, 
which may be rational.

David


Posted on the dev mailing list.