From: gaurav bagga Date: 2006-12-27T01:28:41+09:00 Subject: Re: Newby - how to round up floating point number? ------=_Part_6448_10784810.1167150518627 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline hi, this might help hope this is what you want and if i understood your point just beautify the method try irb(main):008:0> def try(x) irb(main):009:1> if Integer(x)==x irb(main):010:2> p x irb(main):011:2> else irb(main):012:2* x=Integer(x)+1 irb(main):013:2> p x irb(main):014:2> end irb(main):015:1> end => nil irb(main):016:0> try(10.0001) 11 => nil irb(main):017:0> try(10.0) 10.0 => nil irb(main):018:0> try(10) 10 => nil irb(main):019:0> regards gaurav v bagga ------=_Part_6448_10784810.1167150518627--