Bug #2838
Ruby 1.8.7 (2009-06-12 patchlevel 174) strange round behaviour
| Status: | Rejected | Start date: | 03/05/2010 | |
|---|---|---|---|---|
| Priority: | Low | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - | |||
| ruby -v: | 1.8.7 (2009-06-12 patchlevel 174) |
Description
?> a = 64.01+128.38+123.96 => 316.35 >> ?> b = 300+16.35 => 316.35 ?> (a * 10).round => 3163 >> (b * 10).round => 3164
History
Updated by Nobuyoshi Nakada almost 2 years ago
- Status changed from Open to Rejected
- Priority changed from Immediate to Low
FAQ.
Updated by Yui NARUSE almost 2 years ago
Read this: http://docs.sun.com/source/806-3568/ncg_goldberg.html
Updated by Kornelius Kalnbach almost 2 years ago
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 ;)