From: Martin Jambon <martin1977@laposte.net>
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 13:19:40 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0610161315420.3011@droopy> (raw)
In-Reply-To: <e919163f0610161006o529c3a49se51798d079922eb0@mail.gmail.com>
On Mon, 16 Oct 2006, Maurizio Colucci wrote:
> I assume you mean four read_bytes calls...
>
> and make an int32 of
>> them.
>
>
> How do I create an int32 with four bytes?
I can't recall any predefined function. You can read the bytes one by
one, and use Int32.shift_left and Int32.logor to create the int32 value.
> Then simply call Int32.float_of_bits.
>
>
> I get this last one, but I can't imagine the previous step.
>
> Thanks
>
> Maurizio
>
--
Martin Jambon, PhD
http://martin.jambon.free.fr
next prev parent reply other threads:[~2006-10-16 20:19 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
2006-10-16 17:23 ` Tom
2006-10-16 20:19 ` Martin Jambon [this message]
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=Pine.LNX.4.64.0610161315420.3011@droopy \
--to=martin1977@laposte.net \
--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