in reply to Re: Exponential Function Programming
in thread Exponential Function Programming
Your function says that 0 factorial is 0. But it's not; it's 1.sub my_factorial { ... if($n == 0) { $r=0; } return $r; }
In Section
Seekers of Perl Wisdom
in reply to Re: Exponential Function Programming
in thread Exponential Function Programming
Your function says that 0 factorial is 0. But it's not; it's 1.sub my_factorial { ... if($n == 0) { $r=0; } return $r; }