From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr 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 362D7BC69 for ; Sat, 10 Feb 2007 03:31:19 +0100 (CET) Received: from ptb-relay01.plus.net (ptb-relay01.plus.net [212.159.14.212]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l1A2VIGO021115 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Sat, 10 Feb 2007 03:31:19 +0100 Received: from [80.229.56.224] (helo=[10.0.0.5]) by ptb-relay01.plus.net with esmtp (Exim) id 1HFi1G-0002fK-Ak for caml-list@yquem.inria.fr; Sat, 10 Feb 2007 02:31:18 +0000 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Multiplication of matrix in C and OCaml Date: Sat, 10 Feb 2007 02:24:32 +0000 User-Agent: KMail/1.9.5 References: <45CAF3E2.7020807@univ-paris12.fr> <200702092353.09173.jon@ffconsultancy.com> <121wkybxh5.fsf@hod.lan.m-e-leypold.de> In-Reply-To: <121wkybxh5.fsf@hod.lan.m-e-leypold.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200702100224.32450.jon@ffconsultancy.com> X-Miltered: at concorde with ID 45CD2E76.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 compiler:01 flags:01 compiler:01 bug:01 flags:01 ocaml:01 frog:98 wrote:01 caml-list:01 expression:02 specify:06 specify:06 incorrect:06 wrong:09 On Saturday 10 February 2007 01:41, ls-ocaml-developer-2006@m-e-leypold.de wrote: > Sorry, I wanted to say "optimize (a * b) *c == a * (b * c) to true", > i.e. 1. Would the compiler be wrong/incorrect in doing so? Yes. > I don't think so. Provided you only specify -O* optimisation flags, I believe that reducing that expression to "true" in the general case would be a compiler bug. If you specify flags like -ffast-math then anything can happen, but it will happen very quickly! ;-) -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. OCaml for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists