From: ····@att.net
Subject: Converting bytes to a float
Date: 
Message-ID: <1155928639.341941.111710@75g2000cwc.googlegroups.com>
Hi,

Is there a recommendation on how to convert four bytes to a float,
or should I implement the functionality using an FFI.

Thanks in advance.

Cheers,
David

From: Pascal Bourguignon
Subject: Re: Converting bytes to a float
Date: 
Message-ID: <87k655iu5u.fsf@thalassa.informatimago.com>
····@att.net writes:
> Is there a recommendation on how to convert four bytes to a float,
> or should I implement the functionality using an FFI.

Well, if these bytes are under the format expected by your FPU, it
could indeed be faster to store them in memory as bytes, and read them
from same memory as floating points, via FFI.

Otherwise, if they're under the IEEE-754 format,
have a look at GEN-IEEE-ENCODING in: 
http://darcs.informatimago.com/darcs/public/lisp/common-lisp/heap.lisp

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

PLEASE NOTE: Some quantum physics theories suggest that when the
consumer is not directly observing this product, it may cease to
exist or will exist only in a vague and undetermined state.
From: Ivan Boldyrev
Subject: Re: Converting bytes to a float
Date: 
Message-ID: <1ofir3-ula.ln1@ibhome.cgitftp.uiggm.nsc.ru>
On 9571 day of my life ····@att.net wrote:
> Is there a recommendation on how to convert four bytes to a float,
> or should I implement the functionality using an FFI.

There are several versions in Google Groups archives.

-- 
Ivan Boldyrev

                                   Violets are red
                                   Roses are blue
                                   It's amazing what DNA splicing can do.