--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 <manojchourasia / aol.com>

> v1="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/.
>
>


-- 
-- Mirko Viviani --
GPG-PGP Public Key: 0xE4E8FAB1
Fingerprint: 14D3 A373 E926 7737 DF32 502B A4C4 1CE2 E4E8 FAB1
***********************************************
"Ůachines take me by surprise with great frequency.A. Turing

--0016e6db66fab1d083046f737e06--