From: Gerd Stolpmann <info@gerd-stolpmann.de>
To: Maurizio Colucci <maurizio.colucci@gmail.com>
Cc: caml-list <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] Re: Reading 16 bit floats from stream?
Date: Mon, 16 Oct 2006 18:27:21 +0200 [thread overview]
Message-ID: <1161016042.18038.2.camel@localhost.localdomain> (raw)
In-Reply-To: <e919163f0610160903q5ea61cc4g183744a5332e42b7@mail.gmail.com>
Am Montag, den 16.10.2006, 18:03 +0200 schrieb Maurizio Colucci:
>
>
> On 10/16/06, Maurizio Colucci <maurizio.colucci@gmail.com> wrote:
> Hi,
>
> I need to read a sequence of single precision floats (16 bits)
> from a binary file. How can I do that?
>
> Sorry, I mean 32 bits. Single precision floats are 32 bits.
Well, have heard of even 8 bit floats...
32 bit floats can be read. First read the 4 bytes and make an int32 of
them. Then simply call Int32.float_of_bits.
Gerd
--
------------------------------------------------------------
Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany
gerd@gerd-stolpmann.de http://www.gerd-stolpmann.de
Phone: +49-6151-153855 Fax: +49-6151-997714
------------------------------------------------------------
next prev parent reply other threads:[~2006-10-16 16:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <e919163f0610160833t6b04489ev46a2c4dd28860729@mail.gmail.com>
2006-10-16 15:44 ` Maurizio Colucci
2006-10-16 16:03 ` Maurizio Colucci
2006-10-16 16:27 ` Gerd Stolpmann [this message]
2006-10-16 17:06 ` [Caml-list] " Maurizio Colucci
2006-10-16 17:23 ` Tom
2006-10-16 20:19 ` Martin Jambon
2006-10-16 20:35 ` Tom
2006-10-16 23:25 ` Jacques Garrigue
2006-10-17 14:02 ` Maurizio Colucci
2006-10-17 14:32 ` Gerd Stolpmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1161016042.18038.2.camel@localhost.localdomain \
--to=info@gerd-stolpmann.de \
--cc=caml-list@yquem.inria.fr \
--cc=maurizio.colucci@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox