Post Reply 
Recursion on the new Casio fx-CG500
08-13-2017, 10:16 PM
Post: #2
RE: Recursion on the new Casio fx-CG500
(08-13-2017 12:54 PM)Namir Wrote:  I was playing with the Casio fx-CG500 and wrote a recursive program that calculate factorials. I was a bit surprised that it failed to do 10! ... the machine displays an out-of-memory error message. I think I was able to go up to the factorial of 7. This is a disappointing limitation for a machine with 500KB RAM!

Most likely, there's a fixed-size return stack that gets filled long before all of memory gets filled. That's unlike a PC where the return stack is limited only by the size of free memory.

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Recursion on the new Casio fx-CG500 - toml_12953 - 08-13-2017 10:16 PM



User(s) browsing this thread: 1 Guest(s)