From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.bugs Subject: bug#13741: guile-2.0: optimize, and eq-ness of literals (test-suite) Date: Mon, 18 Feb 2013 10:16:57 +0100 Message-ID: <87k3q67zhy.fsf@gnu.org> References: <87621q8fo4.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1361179034 27460 80.91.229.3 (18 Feb 2013 09:17:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Feb 2013 09:17:14 +0000 (UTC) Cc: 13741@debbugs.gnu.org To: Daniel Hartwig Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Mon Feb 18 10:17:36 2013 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U7Mqr-0007Oo-CH for guile-bugs@m.gmane.org; Mon, 18 Feb 2013 10:17:33 +0100 Original-Received: from localhost ([::1]:52150 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7MqX-0001wW-CM for guile-bugs@m.gmane.org; Mon, 18 Feb 2013 04:17:13 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:36515) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7MqS-0001wL-GZ for bug-guile@gnu.org; Mon, 18 Feb 2013 04:17:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U7MqO-0003mf-8B for bug-guile@gnu.org; Mon, 18 Feb 2013 04:17:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56624) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7MqO-0003ma-52 for bug-guile@gnu.org; Mon, 18 Feb 2013 04:17:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U7MrK-0003bk-Ce for bug-guile@gnu.org; Mon, 18 Feb 2013 04:18:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 18 Feb 2013 09:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13741 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 13741-submit@debbugs.gnu.org id=B13741.136117908113861 (code B ref 13741); Mon, 18 Feb 2013 09:18:02 +0000 Original-Received: (at 13741) by debbugs.gnu.org; 18 Feb 2013 09:18:01 +0000 Original-Received: from localhost ([127.0.0.1]:33855 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U7MrJ-0003bW-1g for submit@debbugs.gnu.org; Mon, 18 Feb 2013 04:18:01 -0500 Original-Received: from xanadu.aquilenet.fr ([88.191.123.111]:52242) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U7MrG-0003bN-FZ for 13741@debbugs.gnu.org; Mon, 18 Feb 2013 04:17:59 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by xanadu.aquilenet.fr (Postfix) with ESMTP id 0323EAFB9; Mon, 18 Feb 2013 10:16:59 +0100 (CET) Original-Received: from xanadu.aquilenet.fr ([127.0.0.1]) by localhost (xanadu.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BcHWyI8pqXM9; Mon, 18 Feb 2013 10:16:58 +0100 (CET) Original-Received: from pluto (unknown [193.50.110.200]) by xanadu.aquilenet.fr (Postfix) with ESMTPSA id B653F68ED; Mon, 18 Feb 2013 10:16:58 +0100 (CET) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 30 =?UTF-8?Q?Pluvi=C3=B4se?= an 221 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu In-Reply-To: <87621q8fo4.fsf@gmail.com> (Daniel Hartwig's message of "Mon, 18 Feb 2013 11:27:39 +0800") User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:6744 Archived-At: Daniel Hartwig skribis: > scheme@(guile-user)> (define x 1/2) > scheme@(guile-user)> (eq? x 2/4) > $7 =3D #f > scheme@(guile-user)> ,optimize (eq? x 2/4) > $8 =3D (eq? x 1/2) > scheme@(guile-user)> (define y 2/4) > scheme@(guile-user)> (eq? x y) > $9 =3D #f > scheme@(guile-user)> ,optimize (define y 2/4) > $10 =3D (define y 1/2) Quoth R5RS: `Eq?''s behavior on numbers and characters is implementation-dependent, but it will always return either true or false, and will return true only when `eqv?' would also return true. `Eq?' may also behave differently from `eqv?' on empty vectors and empty strings. What we may get wrong is that it looks as if it doesn=E2=80=99t always retu= rn either true or false, because the behavior depends on whether one of the operands is a literal. However, it=E2=80=99s fundamentally wrong to rely on eq? to compare numbers= . So the test case you mention seems buggy, to start with. WDYT? Ludo=E2=80=99.