From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id pB1HvCxF008259 for ; Thu, 1 Dec 2011 18:57:12 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlgBAN6+107RVdgvimdsb2JhbABEhQOVYogUAYZ/eAgiAQEBCgkNBxIGIYFyAQEBAwESAg8dARsSCwEDAQsGBQQHAxcdAgIiAREBBQEKEgYTEhCHZQiaWgqLHEiCaoUNPYhxAgUKg2KGHoEWBIJbhU2ML41ePYJKgUs X-IronPort-AV: E=Sophos;i="4.71,279,1320620400"; d="scan'208";a="121718439" Received: from mail-qw0-f47.google.com ([209.85.216.47]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 01 Dec 2011 18:57:07 +0100 Received: by qaea17 with SMTP id a17so4872384qae.6 for ; Thu, 01 Dec 2011 09:57:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=AjdgneT87ZhLMYaIZB49BX6DGETCdxOGHUiOjWP0e9w=; b=hj/E7pC2bGFFdoY/kuN6ZJ7WFFR0OkPvdevGOr1OHpcAm60XTLScGKz8kA6W9IMz0M gBq82h2GbIbZ/CcPe0KVHFrHiUlcEpdzznfW2Loni76hbF749OSKKDXByvUY+fjpbBK+ z3M5llZkKGnIqZxsqyxGX5/SEW0phKNSw84r8= MIME-Version: 1.0 Received: by 10.182.227.7 with SMTP id rw7mr1617150obc.70.1322762226089; Thu, 01 Dec 2011 09:57:06 -0800 (PST) Received: by 10.182.111.102 with HTTP; Thu, 1 Dec 2011 09:57:06 -0800 (PST) In-Reply-To: <4ED7AF40.2050101@pvittet.com> References: <4ED7AF40.2050101@pvittet.com> Date: Thu, 1 Dec 2011 12:57:06 -0500 Message-ID: From: Niki Yoshiuchi To: Pierre Vittet Cc: caml-list@inria.fr Content-Type: multipart/alternative; boundary=f46d044472bb9bc03d04b30b94b2 Subject: Re: [Caml-list] float on 32 bits? --f46d044472bb9bc03d04b30b94b2 Content-Type: text/plain; charset=UTF-8 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 wrote: > Hello! > > I am using ocaml to analyse java bytecode (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 > Beginner's list: http://groups.yahoo.com/group/**ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-**bugs > > --f46d044472bb9bc03d04b30b94b2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable OCaml Bigarrays support 32 bit floats, however when you are manipulating th= em in OCaml code they are cast to 64 bit floats.=C2=A0 I am not aware of an= y other modules that support 32 bit floats, although it wouldn't be tha= t hard to write your own with a C backend.

On Thu, Dec 1, 2011 at 11:45 AM, Pierre Vitt= et <piervit@pvi= ttet.com> wrote:
Hello!

I am using ocaml to analyse java bytecode (http://javalib.gforge.inria.fr/). = The fact is that java has a float type which is coded on 32 bits and a doub= le type which is coded on 64 bits. I need to make corresponding types but o= caml only has a float coded on 64 bits (IEE 754 norm, which java respect to= o), 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. =C2=A0Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners<= /a>
Bug reports:
http://caml.inria.fr/bin/caml-bugs


--f46d044472bb9bc03d04b30b94b2--