From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id B5897BC48 for ; Sun, 10 Apr 2005 16:12:53 +0200 (CEST) Received: from will.iki.fi (will.iki.fi [217.169.64.20]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j3AECrEC022928 for ; Sun, 10 Apr 2005 16:12:53 +0200 Received: from [192.168.1.204] (ZMCXLI.dsl.saunalahti.fi [85.76.70.242]) by will.iki.fi (Postfix) with ESMTP id 1EBC0D4; Sun, 10 Apr 2005 17:12:53 +0300 (EEST) Message-ID: <42593456.5050906@exomi.com> Date: Sun, 10 Apr 2005 17:12:38 +0300 From: Ville-Pertti Keinonen User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050401) X-Accept-Language: en-us, en MIME-Version: 1.0 To: sejourne_kevin Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] float precision on AMD64 References: <2a1a1a0c0504091814876c24a@mail.gmail.com> <42588430.3060105@rftp.com> <425914C2.1010101@yahoo.fr> <4259157C.5090400@exomi.com> <42593B4D.2040601@yahoo.fr> <425927FE.606@exomi.com> <42594BED.8070301@yahoo.fr> In-Reply-To: <42594BED.8070301@yahoo.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 42593465.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 ocaml:01 unboxing:01 arrays:01 integers:01 wrote:01 wrote:01 polymorphic:01 floats:01 floats:01 incompatible:01 usable:01 tagged:03 tagged:03 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: sejourne_kevin wrote: > The programs who works with floats in 32 bits shall also work with > floats in 64 bits without one bit from the mantissa, no? Extra precision does not automatically translate to things just working "better", as people have noticed based on the unfortunate x87 design choices. Besides, lots of (most?) programs want full 64-bit floats. Certainly OCaml programs would expect them. > So, what are we waiting for unbox the floats? > Historical reason(C code wrote that use the box representation of the > floats) ? OCaml is already capable of unboxing 64-bit floats when stored in arrays or records containing only floats. By using those, you should get reasonable efficiency. While tagged floats might be a usable solution for some situations, I'm sure I wouldn't be the only person unhappy with the situation if they were made the default. In OCaml they'd also be incompatible with polymorphic compare; unlike other values with a tagged representation, they can't be compared as if they were integers.