[plt-scheme] Dr.Scheme freezes on (fib 100) recursion

From: Richard Cleis (rcleis at mac.com)
Date: Thu Jan 8 02:00:57 EST 2009

(fib 100) is a big number for that function; it'll take awhile to  
compute.  Are you sure it is freezing? When you click the stop sign,  
does the program stop?

rac

On Jan 7, 2009, at 11:45 PM, laa laa wrote:

> my son and i coded a program to compute fibonacci sequences. it  
> works fine for low numbers, but when you try to do something higher  
> like (fib 100) Dr.Scheme freaks out and freezes up. we're wondering  
> what's going on? is there a reason for this. . . .
>
> (define (fib n)
>  (if (< n 3)
>      1
>  (+ (fib (- n 1)) (fib (- n 2)))))
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme



Posted on the users mailing list.