From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Barzilay Newsgroups: gmane.emacs.bugs Subject: Re: calculator thinks 12!! = 0 Date: 02 Jul 2007 21:35:47 -0400 Organization: Northeastern University, College of Computer Science Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1183464759 24333 80.91.229.12 (3 Jul 2007 12:12:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 3 Jul 2007 12:12:39 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 03 14:12:37 2007 connect(): Connection refused Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I5hFE-0000SY-Gj for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Jul 2007 14:12:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I5hFE-00061a-0C for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Jul 2007 08:12:36 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!uio.no!quimby.gnus.org!news.ccs.neu.edu!not-for-mail Original-Newsgroups: gnu.emacs.bug Original-Lines: 31 Original-NNTP-Posting-Host: winooski.ccs.neu.edu Original-X-Trace: camelot.ccs.neu.edu 1183426547 15312 129.10.115.117 (3 Jul 2007 01:35:47 GMT) Original-X-Complaints-To: news@news.ccs.neu.edu Original-NNTP-Posting-Date: Tue, 3 Jul 2007 01:35:47 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 Original-Xref: shelby.stanford.edu gnu.emacs.bug:42971 X-Mailman-Approved-At: Tue, 03 Jul 2007 08:12:07 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:16064 Archived-At: Joe Wells writes: > Dear Emacs gurus, > > To reproduce the problem, type "M-x calculator RET 12 ! !". You will > see the result "0". > > More reasonable behavior would be what calculator does on 171!, which > is return "inf". > > Additional strange behavior can be found by calculating 11!!, which > seems to run forever (or at least longer than I had the patience to > wait). > > The same poor behaviors can be observed also in Emacs 21.4 with the > "-q" command line option, so this is not a new bug and it does not > appear to depend on my configuration. The calculator's factorial is nothing too sophisticated... It was mostly a proof of concept. Some of the things that you see are a result of what you get with: (truncate 479001600.0) (the calculator catches the error and uses 0 instead). I have a fix for that -- if someone tells me where to send a new version to, I'll do that so it gets in. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life!