help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bigger integers


From: Pascal Bourguignon
Subject: Re: bigger integers
Date: 03 Sep 2004 02:11:16 +0000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Joe Corneli <jcorneli@math.utexas.edu> 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?

Run it on a Common-Lisp implementation instead of emacs lisp.

After all, emacs lisp is designed to count characters in a file, not
to compute factorials.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

Our enemies are innovative and resourceful, and so are we. They never
stop thinking about new ways to harm our country and our people, and
neither do we.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]