[ANN] OSC for Squeak

Markus Gaelli gaelli at emergent.de
Wed Mar 30 06:33:34 UTC 2005


Hi Ned,

>> - One test is not running due to bizarre floating point arithmetic:
>> #('/foo' 1000 -1 'hello' 1.233999967575073 5.67799997329712) is
>> certainly not #('/foo' 1000 -1 'hello' 1.234 5.678)
>> Hope nobody needs too precise floats...
>
> Why not just choose either to (a) round the printed output to 0.001, 
> or (b)
> choose floats that can be exactly represented?
>
> Just remember that these are binary fractions...
I fixed the test according to your second suggestion, which did work.

"What Every Computer Scientist Should Know About Floating-Point 
Arithmetic"
is a bit long, but I sure will remember your lesson about binary 
fractions ;-)
http://docs.sun.com/source/806-3568/ncg_goldberg.html

>
> If you used (say) 1.125 and 4.0625 it would probably work better.

Thanks,

Markus




More information about the Squeak-dev mailing list