[squeak-dev] The Inbox: Kernel-nice.651.mcz

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Fri Nov 4 18:16:36 UTC 2011


2011/11/4 Bert Freudenberg <bert at freudenbergs.de>:
> On 03.11.2011, at 22:12, commits at source.squeak.org wrote:
>
>> Print Float with the minimal number of decimal digits that describe it unambiguously.
>> This way, every two different Float will have a different printed representation.
>> More over, every Float can be reconstructed from its printed representation.
>
> Sounds desirable.
>

I forgot to say that we have to pay a penalty for this accuracy, around 4x...
But to me, right > fast.
it should be up to the programmer to decide to compromise right for
fast, and in this case he can also sacrifice a few more digits and be
even faster...

>> Maybe some won't like
>>       Float nan printString = 'Float nan'.
>> But that's a detail we can eventually change back.
>
>
> How about adding NaN as a global?

Yes, but also Infinity, and we would have to handle -Infinity with some trick...
We can delay that decision.
In fact I shouldn't have changed the NaN/infinity part, this was just
to lazily reuse #storeOn:base:
One change at a time, I will commit a version in trunk with unchanged
behaviour for those exceptional cases.

Nicolas

>
> - Bert -
>
>
>
>



More information about the Squeak-dev mailing list