You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2004/10/13 09:07:07 UTC

DO NOT REPLY [Bug 31687] New: - Factorial method throws exception for zero

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31687>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31687

Factorial method throws exception for zero 

           Summary: Factorial method throws exception for zero
           Product: Commons
           Version: 1.0 Alpha
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Math
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: frno@bredband.net


The MathUtils.factorial(final int n) method throws an IllegalArgumentException
for n=0 which is clearly incorrect since 0!=1 by definition.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org