From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.help Subject: Re: bigger integers Date: Sat, 4 Sep 2004 08:18:35 +0000 Organization: muc.de e.V. -- private internet access Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1094286333 14209 80.91.224.253 (4 Sep 2004 08:25:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 4 Sep 2004 08:25:33 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Sep 04 10:25:26 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 1C3VrS-0006sl-00 for ; Sat, 04 Sep 2004 10:25:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C3VwW-0002eA-9H for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Sep 2004 04:30:40 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!irazu.switch.ch!switch.ch!news.belwue.de!informatik.tu-muenchen.de!news.muc.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 22 Original-NNTP-Posting-Host: acm.muc.de Original-X-Trace: marvin.muc.de 1094285814 16627 193.149.49.134 (4 Sep 2004 08:16:54 GMT) Original-X-Complaints-To: news-admin@muc.de Original-NNTP-Posting-Date: 4 Sep 2004 08:16:54 GMT User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.0.35 (i686)) Original-Xref: shelby.stanford.edu gnu.emacs.help:125080 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:20433 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:20433 Joe Corneli wrote on Thu, 02 Sep 2004 17:28:17 -0500: > 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? Why on earth do you want to write a program for a calculation than just about anybody could do in his head? 12! is, of course, 478,002,600. ;-) -- Alan Mackenzie (Munich, Germany) Email: aacm@muuc.dee; to decode, wherever there is a repeated letter (like "aa"), remove half of them (leaving, say, "a").