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.1 required=5.0 tests=AWL,MISSING_HEADERS 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 2A2E7BC69 for ; Fri, 9 Feb 2007 22:55:18 +0100 (CET) Received: from postar.fmf.uni-lj.si (vega.fmf.uni-lj.si [193.2.67.45]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l19LtHst029988 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 9 Feb 2007 22:55:17 +0100 Received: from localhost (unknown [192.168.5.1]) by postar.fmf.uni-lj.si (Postfix) with ESMTP id 1FF3010B9F7 for ; Fri, 9 Feb 2007 22:55:17 +0100 (CET) X-Virus-Scanned: amavisd-new at spam.fmf.uni-lj.si Received: from postar.fmf.uni-lj.si ([192.168.5.5]) by localhost (spam.fmf.uni-lj.si [192.168.5.1]) (amavisd-new, port 10024) with ESMTP id LppZOQNJXJ12 for ; Fri, 9 Feb 2007 23:08:33 +0100 (CET) Received: from [192.168.1.100] (BSN-77-186-71.dsl.siol.net [193.77.186.71]) by postar.fmf.uni-lj.si (Postfix) with ESMTP id 8F3D110B9F1 for ; Fri, 9 Feb 2007 22:55:16 +0100 (CET) Message-ID: <45CCEDD8.3080907@fmf.uni-lj.si> Date: Fri, 09 Feb 2007 22:55:36 +0100 From: Andrej Bauer Reply-To: Andrej.Bauer@andrej.com User-Agent: Icedove 1.5.0.9 (X11/20061220) MIME-Version: 1.0 Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Multiplication of matrix in C and OCaml References: <45CAF3E2.7020807@univ-paris12.fr> <45CAFF5A.2020607@inria.fr> <45CB3ED0.9040200@univ-paris12.fr> <20070209.115842.106265091.garrigue@math.nagoya-u.ac.jp> <1171030953.5302.51.camel@rosella.wigram> <9e4ppv6m15.fsf@hod.lan.m-e-leypold.de> In-Reply-To: <9e4ppv6m15.fsf@hod.lan.m-e-leypold.de> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 45CCEDC5.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; andrej:01 andrej:01 ocaml:01 associative:01 bool:01 associative:01 matrices:01 1.3:98 2.1:98 1.3:98 2.1:98 caml-list:01 checking:02 checking:02 output:02 I hate to add to this long discussion, but since when is floating point multiplication associative? # 1.3 *. (0.7 *. 2.1) = (1.3 *. 0.7) *. 2.1 ;; - : bool = false The suggestion that the results be tested for validity by checking the associative law of multipliciation won't worky very well, and neither will commutativity. In this case, instead of checking that A = B holds, it's better to output the difference between A and B (in case A and B are matrices, output the sup norm of the difference to keep it down to a single number). Andrej