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

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

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

2011/12/10 Stephen Bloch sbl...@adelphi.edu On Dec 9, 2011, at 3:31 PM, Daniel King wrote: On Fri, Dec 9, 2011 at 15:27, Carl Eastlund c...@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

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

On 12/9/11 3:31 PM, Daniel King wrote: On Fri, Dec 9, 2011 at 15:27, Carl Eastlundc...@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

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

On 12/10/11 9:25 AM, David Van Horn wrote: On 12/9/11 3:31 PM, Daniel King wrote: On Fri, Dec 9, 2011 at 15:27, Carl Eastlundc...@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

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

Subject: Re: [racket-dev] feature request: gcd, lcm for rationals One definition of greatest common divisor in a ring R is: d is a greatest common divisor of x and y when: i) d divides both x and y ii) If e is a divisor of both x and y, then d divides e Now let's consider the ring Q. Since Q

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

On Fri, Dec 9, 2011 at 15:27, Carl Eastlund c...@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 don't suppose to understand all the math on

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

On Dec 9, 2011, at 3:31 PM, Daniel King wrote: On Fri, Dec 9, 2011 at 15:27, Carl Eastlund c...@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.

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

I'll make this change. At Wed, 07 Dec 2011 12:25:34 -0500, David Van Horn wrote: It would be nice if gcd and lcm were extended to rational numbers, which seems in-line with Scheme's philosophy (but not standards) on numbers. (define (gcd-rational . rs) (/ (apply gcd (map numerator rs))