caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Niki Yoshiuchi <aplusbi@gmail.com>
To: Pierre Vittet <piervit@pvittet.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] float on 32 bits?
Date: Thu, 1 Dec 2011 12:57:06 -0500	[thread overview]
Message-ID: <CAPVK9BSSJftXPh5Lpb-gBDO1Rp9i70091osjwsB74R3ie+OcPg@mail.gmail.com> (raw)
In-Reply-To: <4ED7AF40.2050101@pvittet.com>

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

OCaml Bigarrays support 32 bit floats, however when you are manipulating
them in OCaml code they are cast to 64 bit floats.  I am not aware of any
other modules that support 32 bit floats, although it wouldn't be that hard
to write your own with a C backend.

On Thu, Dec 1, 2011 at 11:45 AM, Pierre Vittet <piervit@pvittet.com> wrote:

> Hello!
>
> I am using ocaml to analyse java bytecode (http://javalib.gforge.inria.**
> fr/ <http://javalib.gforge.inria.fr/>). The fact is that java has a float
> type which is coded on 32 bits and a double type which is coded on 64 bits.
> I need to make corresponding types but ocaml only has a float coded on 64
> bits (IEE 754 norm, which java respect too), so I don"t know how to get the
> float 32 bits.
>
> Is there some Float32 module? I cannot just place my float 32 into a float
> 64 because I need to get same behaviour on basic operations.
>
> Thanks!
>
> Pierre Vittet
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa-roc.inria.fr/**wws/info/caml-list<https://sympa-roc.inria.fr/wws/info/caml-list>
> Beginner's list: http://groups.yahoo.com/group/**ocaml_beginners<http://groups.yahoo.com/group/ocaml_beginners>
> Bug reports: http://caml.inria.fr/bin/caml-**bugs<http://caml.inria.fr/bin/caml-bugs>
>
>

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

  reply	other threads:[~2011-12-01 17:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-01 16:45 Pierre Vittet
2011-12-01 17:57 ` Niki Yoshiuchi [this message]
2011-12-02  1:46 ` Jon Harrop
2011-12-02 14:07   ` Pierre Vittet

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=CAPVK9BSSJftXPh5Lpb-gBDO1Rp9i70091osjwsB74R3ie+OcPg@mail.gmail.com \
    --to=aplusbi@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=piervit@pvittet.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;
as well as URLs for NNTP newsgroup(s).