From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Panicz Maciej Godek Newsgroups: gmane.lisp.guile.user Subject: Re: Double-precision floating point arithmetics behaves differently in Guile and in C Date: Mon, 27 Sep 2021 16:04:55 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12526"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Guile User To: Matt Wette Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Mon Sep 27 16:13:02 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 1mUrNN-00033H-KR for guile-user@m.gmane-mx.org; Mon, 27 Sep 2021 16:13:01 +0200 Original-Received: from localhost ([::1]:40544 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mUrNM-000426-N0 for guile-user@m.gmane-mx.org; Mon, 27 Sep 2021 10:13:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58146) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mUrFu-000099-Lm for guile-user@gnu.org; Mon, 27 Sep 2021 10:05:19 -0400 Original-Received: from mail-io1-xd2b.google.com ([2607:f8b0:4864:20::d2b]:37544) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mUrFn-0000VX-76 for guile-user@gnu.org; Mon, 27 Sep 2021 10:05:17 -0400 Original-Received: by mail-io1-xd2b.google.com with SMTP id s20so22908432ioa.4 for ; Mon, 27 Sep 2021 07:05:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DvnOW0mHpWeCiGcDLBMtnKDqOLoUq9FnxpLr6adbo+s=; b=OWfUDKekJHH8KuIVGfuoMHD08Ww/xBLExXH8OAIdGT4MLriVPZouLGSXdNrn1gKjzU VpEGeE2CJ3cjFMx+OeAM7PF5AL7qLFcFsmNq/vakrLObfA0s4/vTdiphIk4RMIqyMaKw W2Q1CfpnESaMG+02ueFb5k0JwfInDc9hvdxkE6OfrRLEBLNCdJUXUQsXJeT8afGX5/BV rZ+45xfdY9ITDtpGrDNxsVp8JkRqjKbpzpBqXiC0ENGxaQi5JMaxZvclb4I/gSGFMqNG INyCdHv1TDk1DUnQT53O1FFm93yeR842+x5ZPcAxz/cdYI8ta4liTlsZTBbWqei4jg2M 6FAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DvnOW0mHpWeCiGcDLBMtnKDqOLoUq9FnxpLr6adbo+s=; b=Do1OLtilyzBtYjFo2qImgCtqG7PT6YYAFWpltHPZVuIQQqqv1xsj3FsY0r598sLbUX Vd/0rTmFbs64UHD6o6VxjJl7AQYPWD3pvzzUrgVzLo3yHT9O63gprG/2z9sLXqMQ3RU+ Wq2tA/C6Q6h0il3I30LOmX1Cz+4wVLjUgTc9h6RUGA/b1uhbYPAwpetLRiQWLPVz0v26 SZsqOA7TzMkdhIc4XEYjAO2oZU3+nAnutH7fgbO3lehmgotnSFy/KFz4BGOJiiCNBEJD SkjWs4/ljyGBXeIwvG9hHS5Tn7BnVXtMdg6SjOqBaNgeVzT8J4WtP9IhksBigk4j6TJq iCMw== X-Gm-Message-State: AOAM530xXlgZOp1ysMSB/9ITnwJdCYV8mJYCIhvK1gIejcwmJpuEFOur 2r+DAQHhfNFxYqw973BelpSDPFwcj0DSDhS45Pg= X-Google-Smtp-Source: ABdhPJwxNYoaP21xEqBMoh3qHgUA68Ac23qAFHhXdtJGsE2CP/FZ5Wyag43LZlng+eI/Bq6oML/Jjj106cMfSQgSqwE= X-Received: by 2002:a5e:9b18:: with SMTP id j24mr6331921iok.202.1632751507742; Mon, 27 Sep 2021 07:05:07 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::d2b; envelope-from=godek.maciek@gmail.com; helo=mail-io1-xd2b.google.com X-Spam_score_int: -1 X-Spam_score: -0.2 X-Spam_bar: / X-Spam_report: (-0.2 / 5.0 requ) BAYES_40=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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:17785 Archived-At: niedz., 26 wrz 2021 o 21:11 Matt Wette napisa=C5=82(= 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. However, it turned out that it wasn't those differences that caused the trouble, and I currently believe that the numerical differences can be tolerable for my application. >