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

From: Eli Barzilay (eli at barzilay.org)
Date: Fri Sep 14 15:11:40 EDT 2012

Two hours ago, John Clements wrote:
> I haven't followed the conversation closely enough to understand the
> ramifications of the proposed change, though; my guess is that the
> ffi can still address such arrays, it's just that computing with
> these values will require coercion. I could be okay with that; based
> on my understanding of the IEEE floating-point spec, such a
> translation could be pretty fast; 32bit -> 64bit looks like it would
> just be adding zeros, and 32bit to 64bit would require checking for
> exponent overflow; either way, this sounds like something that might
> be done on-chip by modern processors, and in fact might *already* be
> taking place in floating point 32-bit operations. (Anyone know
> whether Intel chips internally represent 32-bit floats as 64-bit
> ones?)

The main cost is that such a back-and-forth translation will require

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the dev mailing list.