James,
Sorry for not clear problem statement, Yes, the unexpected result is that the float number isn't the same, after adding to FloatArray.
Thanks, Nikolay
On Sun, Dec 21, 2008 at 4:18 AM, James Foster Smalltalk@jgfoster.netwrote:
On Dec 20, 2008, at 5:54 PM, Nikolay Suslov wrote:
Hello,
It is a bug.. or?
A misunderstanding.
FloatArray newFrom: {0.938611557944869}.
Expecting result is the entered float number, but evaluating gives - a FloatArray(0.938611567020416).
Float has the following class comment: "My instances represent IEEE-754 floating-point double-precision numbers." FloatArray has the following class comment: "FloatArrays store 32bit IEEE floating point numbers."
I think what you are seeing is the conversion of 64-bit floating point to 32-bit floating point. Sorry for the initial confusion about your expected result.
James
Nikolay