[squeak-dev] FloatArray gives unexpected results with float
numbers.
Antony Blakey
antony.blakey at gmail.com
Sun Dec 21 02:39:35 UTC 2008
On 21/12/2008, at 12:57 PM, James Foster wrote:
>> FloatArray newFrom: {0.938611557944869}.
>> Expecting result is the entered float number, but evaluating gives
>> - a FloatArray(0.938611567020416).
>
> The comment in the #'newFrom:' methods reads as follows: "Answer an
> instance of me containing the same elements as aCollection." What
> the above does is take a float, add it to an Array, then create a
> FloatArray and add to it each element in the Array.
>
> If you want just the float number, you already have it:
>
> 0.938611557944869 class == Float
I think Nikolay's point is that the number isn't the same.
Antony Blakey
-------------
CTO, Linkuistics Pty Ltd
Ph: 0438 840 787
It's amazing that the one side of the conversation that survived is "I
don't know art, but I know what I like". The reply from the artist was
"Madam, so does a cow".
-- Carl Kirkendall
More information about the Squeak-dev
mailing list
|