From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.lisp.guile.user Subject: Re: Double-precision floating point arithmetics behaves differently in Guile and in C Date: Sun, 26 Sep 2021 14:57:52 +0200 Message-ID: <20210926125752.GA24417@tuxteam.de> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/9DWx/yDrRhgMJTb" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4417"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/1.5.21 (2010-09-15) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sun Sep 26 15:01:15 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 1mUTmN-000110-7f for guile-user@m.gmane-mx.org; Sun, 26 Sep 2021 15:01:15 +0200 Original-Received: from localhost ([::1]:34170 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mUTmJ-0000Eg-MT for guile-user@m.gmane-mx.org; Sun, 26 Sep 2021 09:01:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51912) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mUTjG-0006Mh-Fr for guile-user@gnu.org; Sun, 26 Sep 2021 08:58:02 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:50531) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.90_1) (envelope-from ) id 1mUTj8-0006Eb-OP for guile-user@gnu.org; Sun, 26 Sep 2021 08:58:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:To:Date; bh=bSlUsdkurq0nm77yLVUIEZED8vpkNwjDAzqmfIoJa2Q=; b=CjBOn+M2Hu/H0FPJ/n1NCdOKtryfQIAIU67W4JXVNRCIy/yAWPaYA7vhfsgcFiwMi7X4oCkZAeX37nWMKmZNF5E+T37+AMPXF4C+wt3Rk++02dd9NZBinIVzD7ikdS9L/kQgoG+tnGoSaDh230VI63uK+pt9XjkNf5BHil7VsgJaRj3tH0L7s6rgYfEY5k8GRXFmL9jvjm1xMPYibphBPUOA/BgLtkf7KrEOhuXFatKUygH5ytqOnDzcS6P6PmpLcSo9zoZwOvmS0MAK9fBd/pPYAdBb2ixaNkTVIdm59kb90NCAbVg29w7yIvvBZd83gW9kJ69JkXYHR8qLFJtkUQ==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1mUTj6-0006dM-EL for guile-user@gnu.org; Sun, 26 Sep 2021 14:57:52 +0200 Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, 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:17781 Archived-At: --/9DWx/yDrRhgMJTb Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 26, 2021 at 10:45:51AM +0200, Panicz Maciej Godek wrote: > Hi, >=20 > I recently ran into a very weird problem. I am using code for computing > Singular Value Decomposition that's been ported do Scheme by Gerald Sussm= an > as a part of the scmutils package (more specifically, I use some bits of > code extracted from guile-scmutils Hm. A couple of things to check would be: your C code is using "double" floats (the Guile manual says the inexacts are `doubles')? Are your Guile (what's its version anyway) and C program compiled for the same platform (i.e. word width)? Cheers - t --/9DWx/yDrRhgMJTb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAmFQblAACgkQBcgs9XrR2ka4xACfWA1c22s8ZBLRbKqXFYY3PEyK KQIAnjUSN3eomjBYMOX2et7BDjOCpReD =inHt -----END PGP SIGNATURE----- --/9DWx/yDrRhgMJTb--