[racket-dev] What are single flonums good for?

From: Stephen Bloch (bloch at adelphi.edu)
Date: Wed Sep 12 12:37:40 EDT 2012

On Sep 12, 2012, at 12:24 PM, Vincent St-Amour wrote:

> Single-precision float support used to be enabled via a configure
> option, which meant that some Racket installations would support them,
> and some would not.
> 
> Since zo files are meant to be portable, they could not contain
> single-precision floats. So, compilation would promote single literals
> to doubles.
> 
> This meant that compilation could change the behavior of a program.
> ...
> The solution we picked was to support single-precision floats by default
> and to allow them in zos, which makes these discrepancies go away.
> 
> I agree that having to handle single floats when reasoning about numbers
> complicates things, and it annoys me too. But I still think it's less
> problematic than what I describe above.

Would it be even less problematic to get rid of them entirely, except in FFI?


Stephen Bloch
sbloch at adelphi.edu


Posted on the dev mailing list.