(2011/09/10 10:00), Marc-Andre Lafortune wrote:
> 
> Issue #5273 has been updated by Marc-Andre Lafortune.
> 
> Status changed from Rejected to Open
> 
> Hi,
> 
> Yui NARUSE wrote:
>> Additional to say, 2.5e-22 express the range
>> from 0.0000000000000000000002499999999999999534
>> to__ 0.0000000000000000000002500000000000000003
>>
>> The center of them is 0.0000000000000000000002499999999999999769.
>> So of course 0.0000000000000000000002_499999999999999769.round(22) will be 2.0e-22.
> 
> That's a good point.
> 
> This doesn't make the other examples right though (e.g. 3.0e-31.round(31) should be equal to itself, not to 3.0000000000000003e-31)

irb(main):017:0> 3.0/10**31
=> 3.0000000000000003e-31

This is in short, use BigDecimal.

-- 
NARUSE, Yui  <naruse / airemix.jp>