|
My solution looks practically the same as yours, yet I don't run out of memory calculating multiplication 6 times - I can go to somewhere between 20 and 24 times before I run out. The obvious differences in definition between mine and yours that I can see is that I don't use stream-map, and explicitly define something to multiply a trit into a stream; otherwise, given that we both used the same algorithim, our code looks similar. |
Post your code and let's compare by Mike O'Donnell, 2002, Nov 24
Two code versions and test results by Benedict Singer, 2002, Nov 24
stream-map is probably not the culprit by Mike O'Donnell, 2002, Nov 24
add_xreal and sub_xreal appear not to be the problem by Mike O'Donnell, 2002, Nov 24
mult_power_3_xreal appears not to be the problem by Mike O'Donnell, 2002, Nov 24
ruled out internal defines, define vs. letrec; mult_xreal_lt_one the culprit by Mike O'Donnell, 2002, Nov 24
Problem with global variables inherited in a recursive procedure? by Mike O'Donnell, 2002, Nov 24
to: