Robert Dober wrote: > On Sun, Apr 20, 2008 at 11:45 PM, Michael W. Ryder > <_mwryder / worldnet.att.net> wrote: >> I am part way through implementing a Rational math class to further my >> understanding of Ruby > which is a good idea and I see that you are in good hands with Robert. > When you are done though have a look into ruby's own rational.rb ( or > even earlier depending on how you prefer) and > compare what they have done with your own code, that might bring some > further enlightenments. > I chose this after reading about it in Knuth's 2nd volume. I wanted to try to implement the binary greatest common divisor algorithm in Ruby. It took a little effort but I was able to implement it without any Go Tos. It is hard to go from languages that require jumping around in the code to one that doesn't. It's a totally different mind set. > Cheers > Robert > > P.S. A second thought, look at it *after* you have finished ;) > R. >