From: Tomi Zzzz Date: 2008-09-15T23:36:38+09:00 Subject: Re: how do deal with huge numbers and keep them accurate? thanks u all for taking a few minutes to answer me. I'm really embarrassed cause I wanted to simplify the question so, I didn't wrote down the actual code. I also sorry for not posting any answer yesterday. so once more, your help would be very much appreciate... (I'll drop the 3 lines at the beginning cause I don't sure about them, and don't want to mislead you. (talking about: include... require... etc). this is what i want to achieve with that code: number = gets.chomp.to_f divider = 3.0 while number % divider != 0 divider += 1.0 end puts divider.to_s if divider == 3.0 puts "the number can be divided by " + divider.to_s else puts "can't be divided" end that's it. sorry for repeating myself... once more: i want the ability to input a number like this: 333333333333333333333333333333331 we all know that the answer will be something like that: 1111.....111.333333 but the code will give me the answer that it can be divide by 3, and that's the main problem in that code. Thanks in advanced, Tomiz. p.s. i have tried to implement all of your suggestions with no luck. I've add the code for your comfort. Attachments: http://www.ruby-forum.com/attachment/2683/forum.rb -- Posted via http://www.ruby-forum.com/.