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=2.8 required=5.0 tests=DNS_FROM_RFC_POST,SPF_NEUTRAL autolearn=disabled version=3.1.3 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 873FABBAF for ; Tue, 5 May 2009 18:26:03 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ag4BAIwFAErY7zq8kWdsb2JhbACWOD8BAQEBCQsKBxEDqECBCpAuAQMBA4N+BQ X-IronPort-AV: E=Sophos;i="4.40,298,1238968800"; d="scan'208";a="39492336" Received: from gv-out-0910.google.com ([216.239.58.188]) by mail4-smtp-sop.national.inria.fr with ESMTP; 05 May 2009 18:26:03 +0200 Received: by gv-out-0910.google.com with SMTP id y18so212996gvf.28 for ; Tue, 05 May 2009 09:26:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=I2w72FtAiJ5YvBnsjx3vy34QklvFVVEj/8ZXWyWRz2M=; b=k8YyV9IuHMLz4YP/KAyCIqTbyp/PFiAF7sbQov7sE2m2OSG+AVz5q7qj7K5oIctt7k BzCBgqWll6dxZsBwQ7QIS7UNroCP9TTlbZFHLhBxMsoXliBSYsHV7zkVvFNFOMfpzr/a JbxygioTMLVNfjbPRZXodoe3/Gpb6KzASHUBk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=OZn0rYlHXiuAWiEyR1MCNd36GUP4v5yaMCWsDhVMVVzbThR0OS49IRxzI2rwJfJnwQ FpDf5JdICM/LJ9di/ij1vcwteW0fWkYSqAlfjyh7kR+dPNhXsobcNnFuyfJwCTPJcg89 /xFQlXmJaErS+BNnJZRo6g4UR6WrqsGfLwTbA= MIME-Version: 1.0 Received: by 10.142.133.19 with SMTP id g19mr90649wfd.126.1241540761755; Tue, 05 May 2009 09:26:01 -0700 (PDT) In-Reply-To: <4A006410.8000205@lexifi.com> References: <90823c940904281236x61204451nac149ee15b5df73a@mail.gmail.com> <4A0005C8.8010609@inria.fr> <90823c940905050241y11f012e5xee8316e3e4337ff9@mail.gmail.com> <4A004A05.6040204@lexifi.com> <90823c940905050859q4c203894k5410a7625fe9b2b3@mail.gmail.com> <4A006410.8000205@lexifi.com> Date: Tue, 5 May 2009 20:26:01 +0400 Message-ID: <90823c940905050926t56746bfck4bccfdeb5e7a81a1@mail.gmail.com> Subject: Re: [Caml-list] Re: Ocamlopt code generator question From: Dmitry Bely To: Caml List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; ocamlopt:01 lexifi:01 bytecode:01 runtime:01 numerically:01 bytecode:01 runtime:01 rounding:01 2009:98 jeanmarc:01 eber:01 eber:01 wrote:01 stack:01 dmitry:01 On Tue, May 5, 2009 at 8:06 PM, Jean-Marc Eber wrote: > Hi Dimitry, > > Firstly thanks for looking again at the sse2 stuff! > > A difference may occur, if I'm not wrong, from the intermediate results > precision: > > in sse2, eveything is done on 8 bytes (if you "do" doubles at least), while, > in x87, intermdiate results (kept on the stack) are 10 bytes precision. > > This may result in differences (and the bytecode runtime never uses x87 > intermediate storage, so it behaves _numerically_ like the sse2 code > generator, I guess). I wouldn't be so sure. Bytecode runtime is C compiler-dependent (that does use x87 for floating-point calculations), so rounding errors can lead to different results. Floating point is always approximate... - Dmitry Bely