PHP Classes

AMaths' Bug

Recommend this page to a friend!

      AMaths  >  All threads  >  AMaths' Bug  >  (Un) Subscribe thread alerts  
Subject:AMaths' Bug
Summary:A bug in the Factorial Function
Messages:2
Author:LiGhT MaN
Date:2010-11-17 21:48:01
Update:2010-11-17 21:51:21
 

 


  1. AMaths' Bug   Reply   Report abuse  
Picture of LiGhT MaN LiGhT MaN - 2010-11-17 21:48:02
Hi there,

You did a good job in writing this class, but you have a bug in the Factorial Function Factorial($Num) where if the value of $Num is mins. For instance, $Num = -1

You just need to handle this by checking the value if it's mins and return 0


Thanks & regards,
Sam, Libya

  2. Re: AMaths' Bug   Reply   Report abuse  
Picture of LiGhT MaN LiGhT MaN - 2010-11-17 21:51:21 - In reply to message 1 from LiGhT MaN
Writing Correction: "mins" should be "minus"

Thanks