From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: giacomo boffi Newsgroups: gmane.emacs.help Subject: Re: bigger integers Date: Fri, 17 Sep 2004 21:45:34 +0200 Organization: One Step Beyond Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1095450570 884 80.91.229.6 (17 Sep 2004 19:49:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 17 Sep 2004 19:49:30 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 17 21:49:19 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 1C8OjP-0005tK-00 for ; Fri, 17 Sep 2004 21:49:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C8Op9-0002US-50 for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Sep 2004 15:55:15 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.icl.net!newsfeed.fjserv.net!feed.news.tiscali.de!news.belwue.de!irazu.switch.ch!switch.ch!newsmi-eu.news.garr.it!NewsITBone-GARR!newsserver.cilea.it!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 30 Original-NNTP-Posting-Host: boffi95.stru.polimi.it Original-X-Trace: newsserver.cilea.it 1095450326 1230 131.175.189.141 (17 Sep 2004 19:45:26 GMT) Original-X-Complaints-To: news@cilea.it Original-NNTP-Posting-Date: 17 Sep 2004 19:45:26 GMT User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.5 (chayote, linux) Cancel-Lock: sha1:HxPNy7llL8TO62zvXelDpfYo+pE= Original-Xref: shelby.stanford.edu gnu.emacs.help:125390 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:20745 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:20745 Joe Corneli writes: > This fails on big numbers like 12. > > (defun factorial (num) > (if (<= num 0) > 1 > (* num (factorial (1- num))))) > > Suggestions on how to make it work for bigger numbers? from my *scratch*: (defun factorial (num) (if (<= num 0) 1 (* num (factorial (1- num))))) factorial (factorial 12) 479001600 ah, yes, (insert (emacs-version)) XEmacs 21.5 (beta17) "chayote" (+CVS-20040721) [Lucid] (i686-pc-linux) of Thu Sep 16 2004 on boffi95 -- ATTACKED BY SALESMEN. TORPEDOS. LEAVE BOAT. U-941.