< :前の番号
^ :番号順リスト
> :次の番号
P :前の記事
N :次の記事(スレッド移動)
|<:スレッドの先頭
>|:次のスレッド
^ :返事先
_:自分への返事
>:同じ返事先を持つ記事(前)
<:同じ返事先を持つ記事(後)
---:分割してスレッド表示、再表示
| :分割して(縦)スレッド表示、再表示
~ :スレッドのフレーム消去
.:インデックス
..:インデックスのインデックス
Hi,
As far as I understand, the concept of "the NaN" itself is against the
definition of NaN in the IEEE 754 that defines NaN as set of floating
point values. Correct me if I am wrong.
matz.
In message "Re: [ruby-core:42069] [ruby-trunk - Bug #5884] Float::NAN and 0.0/0.0 is represented differently when packed with 'g'"
on Thu, 12 Jan 2012 08:24:29 +0900, Hiro Asari <asari.ruby / gmail.com> writes:
|
|
|Issue #5884 has been updated by Hiro Asari.
|
|
|Besides it being status quo, what is the rationale behind not having Float::NAN and 0.0/0.0 act identically?
|
|As Brian mentioned, until the introduction of Float::NAN, 0.0/0.0 acted as a means of getting IEEE 754 NaN. If the intent for Float::NAN is to act as *the* NaN, then it seems reasonable to expect these objects to behave the same way in all manners possible.
|
|Of course, if the purpose of Float::NAN is *not* to act as an identical object as 0.0/0.0, then this argument will not hold water.
|
|I don't have a personal stake in this manner; I just want a clarification. Thank you.
|----------------------------------------
|Bug #5884: Float::NAN and 0.0/0.0 is represented differently when packed with 'g'
|https://bugs.ruby-lang.org/issues/5884
|
|Author: Hiro Asari
|Status: Open
|Priority: Normal
|Assignee:
|Category:
|Target version:
|ruby -v: ruby 2.0.0dev (2011-12-31 trunk 34165) [x86_64-darwin11.2.0]
|
|
|$ ruby2.0 -e 'p [Float::NAN].pack("g")'
|"\x7F\xC0\x00\x00"
|
|$ ruby2.0 -e 'p [0.0/0.0].pack("g")'
|"\xFF\xC0\x00\x00"
|
|It would be nice to have Float::NAN and 0.0/0.0 behave identically in this regard.
|
|
|--
|http://bugs.ruby-lang.org/