Hi all,
  A while ago someone asked me what 111111! (factorial) is and I tried
to find out in hugs, but ran into a 'control stack overflow' at around
3500 using a simple recursive factorial function and about 6000 using
foldl.

Ok, maybe 111,111! is asking a bit much...but would it be possible to
write a factorial function that wouldn't stack overflow?  Like it would
crash some other way...not enough memory, taking too long, etc etc?
Stack overflow just seems a little ungraceful :)

(PS: if anyone knows of a way of estimating the value of a factorial,
I'd also appreciate that).

Thanks,
Steve

Reply via email to