< :前の番号
^ :番号順リスト
> :次の番号
P :前の記事
N :次の記事
|<:スレッドの先頭
>|:次のスレッド
^ :返事先
_:自分への返事
>:同じ返事先を持つ記事(前)
<:同じ返事先を持つ記事(後)
---:分割してスレッド表示、再表示
| :分割して(縦)スレッド表示、再表示
~ :スレッドのフレーム消去
.:インデックス
..:インデックスのインデックス
On 16 September 2011 15:49, Tanaka Akira <akr / fsij.org> wrote:
> 2011/9/16 Marc-Andre Lafortune <ruby-core / marc-andre.ca>:
>
>> Yes, floats can be complicated. No I wouldn't recommend to anyone to play with tight limits with floats. But here, it is simply not acceptable that`(foo...bar).step(baz).to_a.last == bar`. On any platform. This is nota question of learning floating point number.
>
> Interesting.
>
> Please show us an actual example of `(foo...bar).step(baz).to_a.last == bar`
== is meaningless with floats.
The previous issue ( the value before the excluded end of the range
not being reached) was most likely the result of guarding against
this:
(1.0...128.4).step(18.2).to_a
=> [1.0, 19.2, 37.4, 55.599999999999994, 73.8, 92.0, 110.19999999999999, 128.4]
I am quite sure that the 128.4 are not the same.
Still Ruby does not display the difference so the result is quite confusing.
Thanks
Michal