< :前の番号
^ :番号順リスト
> :次の番号
P :前の記事
N :次の記事
|<:スレッドの先頭
>|:次のスレッド
^ :返事先
_:自分への返事
>:同じ返事先を持つ記事(前)
<:同じ返事先を持つ記事(後)
---:分割してスレッド表示、再表示
| :分割して(縦)スレッド表示、再表示
~ :スレッドのフレーム消去
.:インデックス
..:インデックスのインデックス
On Apr 21, 2013, at 7:18 PM, naruse (Yui NARUSE) wrote:
> marcandre (Marc-Andre Lafortune) wrote:
>> For any float f, the two following conditions should hold:
>> (1) f.to_s.to_f =3D=3D f (round trips)
>=20
> Yeah, unless you transfer the result of to_s to another environment.
Are you saying that round tripping is only valid on "the native =
architecture's double-precision floating point representation" (quote =
from Float's RDoc)? That would make sense to me.
> x87 FPU stores and calculates floating numbers in 80bit on registers, =
even if it is stored in 64bit on memory.
Does Float on x87 systems use 80-bits to store its value? IOW, is "the =
native architecture's double-precision floating point representation" 80 =
bits on x87?Asking (almost) the same thing a third way, what is =
"sizeof(double)" on a system with an x87 FPU?
> Therefore x87's result may differ from modern FPU's result.
I agree that the results of floating point operations on x87 may differ =
from the same operations on modern FPU's given the same input operands =
due to 80-bit intermediate values on x87, but does this affect the =
parsing of Float literals?
Do Float constants like EPSILON, MIN, and MAX differ between x87 systems =
and modern FPUs?
Does "x87" =3D=3D "non-IEEE-754" and "modern FPU" =3D=3D "IEEE-754"?
I find this topic fascinating and am just trying to understand the =
subtle semantics involved here!
Thanks,
Dave