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

2012-09-12 Thread Neil Toronto
I ask because I'm tired of worrying about them. More precisely, I'm tired of Typed Racket (rightly) making me worry about them. I'm also a little bit tired of this: (: foo (case- (Single-Flonum - Single-Flonum) (Flonum - Flonum) (Real - Real))) (define (foo x)

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

2012-09-12 Thread Vincent St-Amour
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

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

2012-09-12 Thread Stephen Bloch
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

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

2012-09-12 Thread Neil Toronto
On 09/12/2012 10:24 AM, Vincent St-Amour wrote: 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 [compilation could change the behavior of a program].

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

2012-09-12 Thread Eli Barzilay
Two hours ago, Stephen Bloch wrote: Would it be even less problematic to get rid of them entirely, except in FFI? (They're not really an issue for the FFI, since you'd just translate the numbers to them when needed. IOW, racket doesn't even need exact integers to have an FFI with them.) --

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

2012-09-12 Thread Robby Findler
On Wed, Sep 12, 2012 at 11:24 AM, Vincent St-Amour stamo...@ccs.neu.edu 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

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

2012-09-12 Thread Jay McCarthy
On Wed, Sep 12, 2012 at 8:31 AM, Neil Toronto neil.toro...@gmail.com wrote: Compatibility with C code? Why not have the FFI convert them? Save space? I can see that. It won't help much if they're sent to math library functions, though. Those will convert them to flonums and usually box the

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

2012-09-12 Thread Robby Findler
On Wed, Sep 12, 2012 at 3:47 PM, Matthew Flatt mfl...@cs.utah.edu wrote: At Wed, 12 Sep 2012 08:31:29 -0600, Neil Toronto wrote: Why do we have these things? I'm not sure this reason from 1996 is still relevant, but FWIW: Originally, there were drawing-related `float' computations in C code