From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Maxime Devos Newsgroups: gmane.lisp.guile.user Subject: Re: Double-precision floating point arithmetics behaves differently in Guile and in C Date: Sat, 16 Oct 2021 09:19:20 +0000 Message-ID: <1ccca62c46bb1b150e1fdd44260fe67be3fd83d6.camel@telenet.be> References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26193"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.38.3-1 Cc: Guile User To: Panicz Maciej Godek , Matt Wette Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sat Oct 16 11:24:48 2021 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mbfvs-0006e8-IN for guile-user@m.gmane-mx.org; Sat, 16 Oct 2021 11:24:48 +0200 Original-Received: from localhost ([::1]:53994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mbfvq-0007bf-UE for guile-user@m.gmane-mx.org; Sat, 16 Oct 2021 05:24:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50878) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mbfvd-0007bX-SJ for guile-user@gnu.org; Sat, 16 Oct 2021 05:24:34 -0400 Original-Received: from laurent.telenet-ops.be ([2a02:1800:110:4::f00:19]:34494) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mbfvb-00039S-KP for guile-user@gnu.org; Sat, 16 Oct 2021 05:24:33 -0400 Original-Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by laurent.telenet-ops.be with bizsmtp id 6ZKL2600Q4UW6Th01ZKLAq; Sat, 16 Oct 2021 11:19:21 +0200 In-Reply-To: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1634375961; bh=hALkpwAicOVc1XzuH8X+JoIoN/QphaOko6VYVXiYAWA=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=UY4hl7Df/VUI6dQmu+rVGGSHVk7IFTSJaljbPJkP3vcJEQHmZO8pEvrXutjgBAb5o wK0LgR5BerTEc2oU1vAFUhBAOLWG9f3gmNnJknnwl2AW0hWi1N4bAGaUM5fL1e2sRX Jl4uzUfZMPMFXS4xAu/Dq96dZwZrykk2d3++M+yz+VOU0fq/J5OYCY6WdXndjHc3VI c8EM0qG7KnzYwxhYQsoYkUYOEz+TTqoo+OF25bFs332LKNAbTJztq6prNdcgHrbNOL vaW5Jbju5w+07YEZgE6E98cI7sNIdl4mXk6uhXSKU99EZj7gKgs2EmQjvpdv9C2vZv +SAsy+F3y5iVA== Received-SPF: pass client-ip=2a02:1800:110:4::f00:19; envelope-from=maximedevos@telenet.be; helo=laurent.telenet-ops.be X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:17809 Archived-At: Panicz Maciej Godek schreef op ma 27-09-2021 om 16:04 [+0200]: > niedz., 26 wrz 2021 o 21:11 Matt Wette > napisał(a): > > > Your post is a little vague.  Are you comparing singular values > > vectors > > of A vs > > eigenvalues, eigenvectors of A'*A ?  Also, SVD is iterative and > > different algorithms may yield > > different results (and some of the SVD algorithms out there are not > > great). > >   Are you using the exact same algorithm but noticing that (op x y) > > in > > Guile > > behaves differently than (x op y) in C? > > > > > Yes. > I mean, I have used exactly the same algorithm (obtained by > mechanically > transforming the scmutils code into C), and I've been looking at its > operation, and noticed that the results of floating point operations > differed between Guile and C for the same input data. If this is on x86, https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-fexcess-precision might be relevant. Greetings, Maxime.