From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Marius Vollmer Newsgroups: gmane.lisp.guile.devel Subject: Re: doc eq? eqv? equal? Date: Fri, 20 Aug 2004 12:26:49 +0200 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: References: <87r7q2a9c8.fsf@zip.com.au> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1092998030 29889 80.91.224.253 (20 Aug 2004 10:33:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 20 Aug 2004 10:33:50 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Aug 20 12:33:41 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1By6iL-00040P-00 for ; Fri, 20 Aug 2004 12:33:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1By6md-0003zP-Oy for guile-devel@m.gmane.org; Fri, 20 Aug 2004 06:38:07 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1By6mZ-0003y9-Of for guile-devel@gnu.org; Fri, 20 Aug 2004 06:38:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1By6mU-0003wf-OG for guile-devel@gnu.org; Fri, 20 Aug 2004 06:38:01 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1By6mU-0003wU-Hz for guile-devel@gnu.org; Fri, 20 Aug 2004 06:37:58 -0400 Original-Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1By6hq-00084V-Hb for guile-devel@gnu.org; Fri, 20 Aug 2004 06:33:10 -0400 Original-Received: from [129.217.163.1] (helo=mail.dt.e-technik.uni-dortmund.de) by mx20.gnu.org with esmtp (Exim 4.34) id 1By6ga-0007we-1B for guile-devel@gnu.org; Fri, 20 Aug 2004 06:31:52 -0400 Original-Received: from troy.dt.e-technik.uni-dortmund.de (troy.dt.e-technik.uni-dortmund.de [129.217.163.17]) by mail.dt.e-technik.uni-dortmund.de (Postfix) with ESMTP id D50BF39F74 for ; Fri, 20 Aug 2004 12:26:50 +0200 (CEST) Original-Received: by troy.dt.e-technik.uni-dortmund.de (Postfix, from userid 520) id F06ACB98A; Fri, 20 Aug 2004 12:26:49 +0200 (CEST) Original-To: guile-devel@gnu.org In-Reply-To: <87r7q2a9c8.fsf@zip.com.au> (Kevin Ryde's message of "Fri, 20 Aug 2004 11:26:15 +1000") User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:3992 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:3992 Kevin Ryde writes: > In guile "(eq? x x)" is always going to be true, but I'm wondering if > the docs should describe only the weaker r5rs behaviour, and advise > eqv? for anything involving numbers. Yes, comparing x with itself is probably rare and the general case (eq? x y) is false for bignums. So eqv? is the right thing to use for numbers. Or '=' if you want to make sure that you are dealing with numbers. guile> (eq? (expt 2 20) (expt 2 20)) #t guile> (eq? (expt 2 40) (expt 2 40)) #f guile> (eqv? (expt 2 40) (expt 2 40)) #t guile> (= (expt 2 40) (expt 2 40)) #t _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel