From: Paul Lutus Date: 2006-11-27T03:30:08+09:00 Subject: Re: coding practise sempsteen wrote: > Thanks Paul. > I knew that my code was inefficient. That's the reason why i'm here. I > thought, because i'm dealing with numbers i can define handling > methods inside Fixnum (neglecting Bignum). > Now i will write it again in a different class as your code by myself. I am certain you can improve on my code. There are a number of efficiencies that I didn't include that would improve the performance of the algorithm, like the prime-number strategy outlined here: http://en.wikipedia.org/wiki/Amicable_number Although that strategy sometimes fails, it should give you some ideas about improving the method. -- Paul Lutus http://www.arachnoid.com