Recursion on the new Casio fx-CG500
|
08-13-2017, 12:54 PM
Post: #1
|
|||
|
|||
Recursion on the new Casio fx-CG500
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!
|
|||
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? |
|||
08-14-2017, 08:23 AM
Post: #3
|
|||
|
|||
RE: Recursion on the new Casio fx-CG500
Makes sense!
Namir |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)