From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: lloda Newsgroups: gmane.lisp.guile.bugs Subject: bug#74031: [PATCH] srfi-64: Accept complex numbers in test-approximate. Date: Sat, 26 Oct 2024 20:46:25 +0200 Message-ID: <40FEB680-90BC-4915-AFE9-88F4B638E59A@sarc.name> References: <20241026161015.21049-1-~@wolfsden.cz> <87ed42vkwp.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) 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="11536"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74031@debbugs.gnu.org, Tomas Volf <~@wolfsden.cz> To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Sat Oct 26 20:47:59 2024 Return-path: Envelope-to: guile-bugs@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 1t4lpO-0002nG-Rz for guile-bugs@m.gmane-mx.org; Sat, 26 Oct 2024 20:47:59 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t4low-0003PU-It; Sat, 26 Oct 2024 14:47:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t4lov-0003Oy-3X for bug-guile@gnu.org; Sat, 26 Oct 2024 14:47:29 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t4lou-0001p3-Io for bug-guile@gnu.org; Sat, 26 Oct 2024 14:47:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:Date:In-Reply-To:From:Mime-Version:To:Subject; bh=wUzjgxgo8HNB+MHiTUOzc9AAIEAAvc9oLtlXOE2ELl0=; b=v0FKPno1uBcIR3MXwpQjKbFXXVxCG8uI1wNj1ahV6W22bc/kB1UdGUmjpfEkqhi+WyvnTGM0sXAn1FXkj5Qpx9QpcEXxrckTPwaWhuHHpoAKcxLRZBBrt57z2bTWDnlWcWrhLFucjp+XPadFP1V4vHKilvcikVyhnZp8hg2PWrjwY4kuBerbCu3ItHcsJbHh023DXc8vlacFGPLRQLstWFZYym+edIsFFgFVyykGyp9/CV1KGQJm+lLASqM+PKEtWeGuoPcIbOUK2ybaSHa2jsNT6fK61U/M8DbNoUWsnJetks9WJcvxWtUBscc4D07kANGt7zvOdFkxn1ck+O4I0w==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t4lpS-0004G0-7A for bug-guile@gnu.org; Sat, 26 Oct 2024 14:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: lloda Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 26 Oct 2024 18:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74031 X-GNU-PR-Package: guile X-GNU-PR-Keywords: patch Original-Received: via spool by 74031-submit@debbugs.gnu.org id=B74031.172996843216268 (code B ref 74031); Sat, 26 Oct 2024 18:48:02 +0000 Original-Received: (at 74031) by debbugs.gnu.org; 26 Oct 2024 18:47:12 +0000 Original-Received: from localhost ([127.0.0.1]:42589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t4lod-0004EK-Lg for submit@debbugs.gnu.org; Sat, 26 Oct 2024 14:47:12 -0400 Original-Received: from mta-14-3.privateemail.com ([198.54.127.110]:38100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t4lob-0004E3-Pi for 74031@debbugs.gnu.org; Sat, 26 Oct 2024 14:47:10 -0400 Original-Received: from mta-14.privateemail.com (localhost [127.0.0.1]) by mta-14.privateemail.com (Postfix) with ESMTP id 8014118000A9; Sat, 26 Oct 2024 14:46:30 -0400 (EDT) Original-Received: from [192.168.1.16] (unknown [51.154.167.214]) by mta-14.privateemail.com (Postfix) with ESMTPA; Sat, 26 Oct 2024 14:46:27 -0400 (EDT) In-Reply-To: <87ed42vkwp.fsf@gnu.org> X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.bugs:11086 Archived-At: > On 26 Oct 2024, at 19:22, Ludovic Court=C3=A8s wrote: >=20 > Hi, >=20 > (Cc: lloda.) >=20 > Tomas Volf <~@wolfsden.cz> skribis: >=20 >> The specification mandates reals, but the reference implementation >> supports complex numbers. So as implementation extension, support = them >> as well. >>=20 >> * module/srfi/srfi-64.scm (within-epsilon): Support complex = arguments. >> --- >> Proposal for how to extend test-approximate to handle complex = arguments. >> However it differs from the original one. That one expected `error' = to be a >> real number, and used it for comparing both real parts and imaginary = parts. >>=20 >> To me, that seems weird. I would consider it useful to be able to = have >> different errors for real and imaginary parts. >>=20 >> However I cannot remember the last time I have used complex numbers, = so I am not >> sure I am qualified to have an opinion here. What do other people = think? >=20 > Not sure either. Daniel, is that what you would expect? >=20 > Perhaps we should check the reference implementation? >=20 > Ludo=E2=80=99. Sorry, I didn't notice this. I replied on another message, but to be = clear, the expected error should always be a real number, no matter what = you're comparing. If one wants to have separate errors for real and = imaginary parts, then one can simply use test-approximate on the real = and imaginary parts separately. Regards=20 Daniel