From: Gui Djos Date: 2010-02-16T13:18:57+09:00 Subject: Re: Newbie needs help William Rutiser wrote: > In Ruby, numbers without a decimal point are treated as integers. The > result of dividing an integer by an integer is an integer with any > remainder discarded. If either argument is a float, the result is a > float without rounding or truncation. The "Float()" method only converts > the result of its argument expression to float. Try dividing by 2.0 > instead of 2. > > You should also look up the relative precedence of the ** and + > operator, and while you have the book open, check on how Ruby deals with > negative quotients of integers. > > -- Bill Now that's a useful post. Rob's was nice too, and I appreciate it guys. I'll have a look at all the info you gave me and try to see through this one. -- Posted via http://www.ruby-forum.com/.