read float in other base

nicolas cellier ncellier at ifrance.com
Fri Apr 21 22:05:05 UTC 2006


I have a correction for http://bugs.impara.de/view.php?id=3493,
(it is an overflow problem with these silent Infinity GRRR)
but bad luck, there is another bug in the same method:

    (Number readFrom: ((String new: 100) writeStream
        nextPutAll: '2r1.';
        next: 52 put: $1;
        nextPutAll: 'e1023';
        contents)) printStringBase: 2.

    "will answer 2r2.0e1024"

I wonder if the case can ever show in base 10 (the logical conditions tc1 and 
tc2 in the code are too much for my brain at this late time).
In that case you would get letter A before decimal point sometimes...
I am quite sure sometimes means almost never (it would be corrected already), 
but with some bad luck, it could hurt a poor guy printing Floats like me...
Anyone have a big SUnit related to Float that could be recycled on this print 
method ?

 Nicolas




More information about the Squeak-dev mailing list