in reply to Factorial algorithm execution time
Perhaps some trivial unit tests would be helpful.....
Update: added second arg to fact2. (thanks YuckFoo)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;
-Blake
|
---|
In Section
Seekers of Perl Wisdom