From: olavi ivask Date: 2007-12-19T16:02:51+09:00 Subject: Re: Round off float value Saravanan Krishnan wrote: > olavi ivask wrote: > >> Hi, >> >> you can do like this: >> >> number = 179.9485 >> printf('%.2f', number) >> >> this one prints out 179.95 >> >> Olavi Ivask >> > > Thanks for your instant reply. > > here i want to store that value not to print. > floated = (number * 100).round.to_f / 100 Olavi > Regards > saravanan.K >