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 pB2EFcjU032159 for ; Fri, 2 Dec 2011 15:15:39 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjMDAMnc2E4uaTnIjGdsb2JhbABEhQSVb5A7AQEBCgsLBxMmgXIBAQUjDwEFNgoNBAsRBAEBAwIFBBIIAwICCQMCAQIBMwEJCAYBDAYCAQEOh3cGpUySA4Ewgj2GHoEWBKZv X-IronPort-AV: E=Sophos;i="4.71,283,1320620400"; d="scan'208";a="121833131" Received: from 7.mo3.mail-out.ovh.net (HELO mo3.mail-out.ovh.net) ([46.105.57.200]) by mail4-smtp-sop.national.inria.fr with ESMTP; 02 Dec 2011 15:15:33 +0100 Received: from mail181.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo3.mail-out.ovh.net (Postfix) with SMTP id 74B8A1028B04 for ; Fri, 2 Dec 2011 15:07:32 +0100 (CET) Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 2 Dec 2011 16:07:31 +0200 Received: from llosa.irisa.fr (HELO ?131.254.12.252?) (piervit@pvittet.com@131.254.12.252) by ns0.ovh.net with SMTP; 2 Dec 2011 16:07:29 +0200 Message-ID: <4ED8DB9A.7010805@pvittet.com> Date: Fri, 02 Dec 2011 15:07:22 +0100 From: Pierre Vittet User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110705 Thunderbird/3.1.11 MIME-Version: 1.0 To: Jon Harrop , aplusbi@gmail.com, caml-list@inria.fr X-Ovh-Mailout: 178.32.228.3 (mo3.mail-out.ovh.net) References: <4ED7AF40.2050101@pvittet.com> <045001ccb094$27827050$768750f0$@ffconsultancy.com> In-Reply-To: <045001ccb094$27827050$768750f0$@ffconsultancy.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 15825930566598525172 X-Ovh-Remote: 131.254.12.252 (llosa.irisa.fr) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-OVH-SPAMSTATE: OK X-OVH-SPAMSCORE: 0 X-OVH-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeefjedrtdekucetggdotefuucfrrhhofhhilhgvmecuqfggjfenuceurghilhhouhhtmecufedttdenucenucfjughrpefkfffhfgggvffufhgjtgfgsehtkegrtddtfeejnecuhfhrohhmpefrihgvrhhrvgcugghithhtvghtuceophhivghrvhhithesphhvihhtthgvthdrtghomheqnecuffhomhgrihhnpeen X-Spam-Check: DONE|U 0.5/N X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeefjedrtdekucetggdotefuucfrrhhofhhilhgvmecuqfggjfenuceurghilhhouhhtmecufedttdenucenucfjughrpefkfffhfgggvffufhgjtgfgsehtkegrtddtfeejnecuhfhrohhmpefrihgvrhhrvgcugghithhtvghtuceophhivghrvhhithesphhvihhtthgvthdrtghomheqnecuffhomhgrihhnpeen Subject: Re: [Caml-list] float on 32 bits? Thanks for your answers (Jon and Niki). I was not aware about that behaviour difference between ocamlc and ocamlopt... Pierre Le 02/12/2011 02:46, Jon Harrop a écrit : > You'll probably have to do a lot of work to get the same floating point behaviour from OCaml. Firstly, OCaml compiled with ocamlopt often retains 80 bits of precision when processing in registers. Secondly, the Java specification mandates more accurate handling of some functions, e.g. trigonometric functions. Note that floats are treated differently by code compiled with ocamlc and ocamlopt. > > Cheers, > Jon. > >> -----Original Message----- >> From: Pierre Vittet [mailto:piervit@pvittet.com] >> Sent: 01 December 2011 16:46 >> To: caml-list@inria.fr >> Subject: [Caml-list] float on 32 bits? >> >> 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 > > >