http://qs321.pair.com?node_id=206115


in reply to Factorial algorithm execution time

Perhaps some trivial unit tests would be helpful.....
die "fact is broken" unless fact(5) == 120; die "fact2 is broken" unless fact2(5,1) == 120; die "fact3 is broken" unless fact3(5) == 120;
Update: added second arg to fact2. (thanks YuckFoo)

-Blake