[squeak-dev] floats

Juan Vuletich juan at jvuletich.org
Sun Mar 15 13:04:41 UTC 2009


Bert Freudenberg wrote:
> On 15.03.2009, at 02:51, Colin Putney wrote:
>
>>  Are floats that important?
>
> For interactive graphics they are, very much, yes, and that is one of 
> the major reasons for Squeak to exist.
>
> But even in general, having Float arithmetic is so convenient to 
> developers that it crept into many places that don't even really need 
> it. In an image that is not that important to you, try making 
> Float>>sqrt do "self halt", and then move a window for example.
>
> Or take the OLPC hardware designers - they went for the lowest-power 
> chip that had a decent floating point unit (or at least that was a 
> major factor) because there is so much software out there that relies 
> on float support and that does not perform adequately with emulation.
>
> - Bert -
>
Some of the things that require float arithmetic to give best results, 
or to work at all, include jpeg image coding and decoding, mp3 audio 
coding and decoding, video coding and decoding, image scaling (or 
viewing photos, for example), image processing (for photo enhancing, for 
example), TrueType fonts, sound synthesis, audio processing,  voice 
synthesis, voice recognition, 3d modeling and rendering (such as 
Croquet), zoomeable and resolution independent user interfaces, most of 
the modern effects done by window managers, games, simulations... I'm 
sure this list could be much larger.

DSP chips for embedded devices have specialized in doing float 
arithmetic with a good and predictable performance long before Intel 
included it in every desktop.

Floats are a great approximation to the "real" thing (i.e. real numbers) 
a computer can handle, in many cases the best. If the math you're doing 
includes any transcendental functions, or even division, you should 
consider using floats seriously.

I mean, yes, they are "that" important.

Cheers,
Juan Vuletich



More information about the Squeak-dev mailing list