Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 13384 invoked from network); 2 Nov 2010 10:07:52 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Nov 2010 10:07:52 -0000 Received: (qmail 5374 invoked by uid 500); 2 Nov 2010 10:08:23 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 5122 invoked by uid 500); 2 Nov 2010 10:08:21 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 5112 invoked by uid 99); 2 Nov 2010 10:08:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Nov 2010 10:08:20 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [193.74.71.27] (HELO eir.is.scarlet.be) (193.74.71.27) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Nov 2010 10:08:12 +0000 Received: from mail.harfang.homelinux.org (ip-62-235-225-231.dsl.scarlet.be [62.235.225.231]) by eir.is.scarlet.be (8.14.2/8.14.2) with ESMTP id oA2A7oI4019548 for ; Tue, 2 Nov 2010 11:07:51 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scarlet.be; s=scarlet; t=1288692471; bh=rB7er1+9hgRG7SjNHzbQJyZGV6lHBDOdSL89EG693vw=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type; b=NblYrdiWfNlTJAe6hLkCW73FdO5xZFKg5E7f1/vdlh50JkNtUKlLcyXac9BETIw8Q +3ujTe0JewWWo76BW/KpEX+AXuOskJihuZiQw9n67M6/BhS7PLYcy4NLZilpo5PHP/ MspvedlQ8no7DW+iKyuPIX1c/N0ahtQ6eYwtsra8= Received: from localhost (mail.harfang.homelinux.org [192.168.20.11]) by mail.harfang.homelinux.org (Postfix) with ESMTP id 9D41561CE9 for ; Tue, 2 Nov 2010 11:07:50 +0100 (CET) Received: from mail.harfang.homelinux.org ([192.168.20.11]) by localhost (mail.harfang.homelinux.org [192.168.20.11]) (amavisd-new, port 10024) with ESMTP id WRCGim45TTaw for ; Tue, 2 Nov 2010 11:07:44 +0100 (CET) Received: from dusk.harfang.homelinux.org (mail.harfang.homelinux.org [192.168.20.11]) by mail.harfang.homelinux.org (Postfix) with ESMTP id 7E8B0617BC for ; Tue, 2 Nov 2010 11:07:44 +0100 (CET) Received: from eran by dusk.harfang.homelinux.org with local (Exim 4.72) (envelope-from ) id 1PDDmJ-00038L-Ax for dev@commons.apache.org; Tue, 02 Nov 2010 11:07:43 +0100 Date: Tue, 2 Nov 2010 11:07:42 +0100 From: Gilles Sadowski To: dev@commons.apache.org Subject: [Math] Factorial Message-ID: <20101102100742.GN10411@dusk.harfang.homelinux.org> Mail-Followup-To: dev@commons.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: Tiny Tux X-PGP-Key-Fingerprint: 53B9 972E C2E6 B93C BEAD 7092 09E6 AF46 51D0 5641 User-Agent: Mutt/1.5.20 (2009-06-14) X-DCC-scarlet.be-Metrics: eir 20002; Body=1 Fuz1=1 Fuz2=1 X-Virus-Checked: Checked by ClamAV on apache.org Hello. In "MathUtils", the documentation of method "factorialDouble" says that it will return INFINITY when the result is larger than MAX_VALUE. It also says that this will happen when n > 170. So, I think that it should be more appropriate to throw an "ArithmeticException" (as is done in the method "factorial" when n > 20). Gilles --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org