Forum: Ruby-core [Bug #2838] Ruby 1.8.7 (2009-06-12 patchlevel 174) strange round behaviour

Posted by P K (Guest)
on 2010-03-05 14:53
(Received via mailing list)
Bug #2838: Ruby 1.8.7 (2009-06-12 patchlevel 174) strange round 
behaviour
http://redmine.ruby-lang.org/issues/show/2838

Author: P K
Status: Open, Priority: Immediate
ruby -v: 1.8.7 (2009-06-12 patchlevel 174)

?> a = 64.01+128.38+123.96
=> 316.35
>>
?> b = 300+16.35
=> 316.35

?> (a * 10).round
=> 3163
>> (b * 10).round
=> 3164
Posted by Nobuyoshi Nakada (Guest)
on 2010-03-05 16:30
(Received via mailing list)
Issue #2838 has been updated by Nobuyoshi Nakada.

Status changed from Open to Rejected
Priority changed from Immediate to Low

FAQ.
----------------------------------------
http://redmine.ruby-lang.org/issues/show/2838
Posted by Yui NARUSE (Guest)
on 2010-03-06 00:23
(Received via mailing list)
Issue #2838 has been updated by Yui NARUSE.


Read this:
http://docs.sun.com/source/806-3568/ncg_goldberg.html
----------------------------------------
http://redmine.ruby-lang.org/issues/show/2838
Posted by Kornelius Kalnbach (--murphy)
on 2010-03-06 02:22
(Received via mailing list)
On 06.03.10 00:23, Yui NARUSE wrote:
> http://docs.sun.com/source/806-3568/ncg_goldberg.html
In short: Don't expect exact results when using Floats ;)
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.