From: Mirko Viviani Date: 2009-07-24T22:22:27+09:00 Subject: Re: Arithmetic operation bug --0016e6db66fab1d083046f737e06 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable the problem seems to be in to_i 2009/7/24 Manoj Chourasia > v1=3D"128.015" > puts((v1.to_f*1000).to_i).to_s // giving 128014 instead of 128015 > > Why the the result is rounding up to 128014 but the correct result > should be 128015. > -- > Posted via http://www.ruby-forum.com/. > > --=20 -- Mirko Viviani -- GPG-PGP Public Key: 0xE4E8FAB1 Fingerprint: 14D3 A373 E926 7737 DF32 502B A4C4 1CE2 E4E8 FAB1 *********************************************** "=93Machines take me by surprise with great frequency.=94 A. Turing --0016e6db66fab1d083046f737e06--