From: Lloyd Linklater Date: 2007-07-19T23:56:54+09:00 Subject: Re: Float.to_int not working ?? unknown wrote: > Trying the following > > print "#{((1.0 + 0.025)/0.0002 + 1.0)} \n" > print "#{((1.0 + 0.025)/0.0002 + 1.0).to_i} \n" > > I get (with ruby 1.8.4 & 1.8.5, Linux) as output > > 5126.0 > 5125 > > Any suggestions? What about print "#{((1.0 + 0.025)/0.0002 + 1.0).round.to_i} \n" -- Posted via http://www.ruby-forum.com/.