Subject: Reading 32-bit IEEE floats from binary file ??
From: Christophe Pouzat
Date: Fri, 24 May 2013 21:14:03 +0200
>>>>>> "Henry" == Henry Baker <hbaker1 at pipeline.com> writes:
>
> Henry> Is there a Common Lisp package that knows how to read
> Henry> binary format 32-bit IEEE floats from a binary file? I can
> Henry> cobble one together without too much trouble, but I was
> Henry> just wondering if someone else had already done it.
>
> In addition to what Robet mentioned, if you search for ieee on
> cliki.net, the top two hits might be relevant:
>
> ieee-floats: http://common-lisp.net/project/ieee-floats/
> binary-types: http://cliki.net/Binary-types
>
> I've never used these myself.
>
> Ray
>
Hi everyone,
I've been using ieee-floats for a bit more than a year now and I'm very
happy with it: its simple to use and fast (see an example in function
"mk-mts-from-double" in the following file
https://raw.github.com/christophe-pouzat/Neuronal-spike-sorting/master/code/spike-sorting.lisp;
the example is with 64-bit data but it works immediately with 32-bit
data with obvious changes). There is a function doing the same job in
GSLL (I forgot the name, sorry) but it's at least an order of magnitude
slower.
Christophe
--
Programming languages teach you not to want what they cannot provide. You have to think in a language to write programs in it, and it's hard to want something you can't describe.
Paul Graham, ANSI Common Lisp.
--
Christophe Pouzat
MAP5 - Math?matiques Appliqu?es ? Paris 5
CNRS UMR 8145
45, rue des Saints-P?res
75006 PARIS
France
tel: +33183945882
mobile: +33662941034
web: http://xtof.disque.math.cnrs.fr/