caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "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 19:06:46 +0200	[thread overview]
Message-ID: <e919163f0610161006o529c3a49se51798d079922eb0@mail.gmail.com> (raw)
In-Reply-To: <1161016042.18038.2.camel@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 758 bytes --]

On 10/16/06, Gerd Stolpmann <info@gerd-stolpmann.de> wrote:
>
> 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


I assume you mean four read_bytes calls...

and make an int32 of
> them.


How do I create an int32 with four bytes?

Then simply call Int32.float_of_bits.


I get this last one, but I can't imagine the previous step.

Thanks

Maurizio

[-- Attachment #2: Type: text/html, Size: 1606 bytes --]

  reply	other threads:[~2006-10-16 17:06 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     ` [Caml-list] " Gerd Stolpmann
2006-10-16 17:06       ` Maurizio Colucci [this message]
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=e919163f0610161006o529c3a49se51798d079922eb0@mail.gmail.com \
    --to=maurizio.colucci@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    /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;
as well as URLs for NNTP newsgroup(s).