Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6521E9B6B for ; Thu, 23 Feb 2012 08:26:19 +0000 (UTC) Received: (qmail 16291 invoked by uid 500); 23 Feb 2012 08:26:18 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 16165 invoked by uid 500); 23 Feb 2012 08:26:18 -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 16154 invoked by uid 99); 23 Feb 2012 08:26:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Feb 2012 08:26:17 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of SRS0=uvdC=BB=m4x.org=sebastien.brisard@bounces.m4x.org designates 129.104.30.34 as permitted sender) Received: from [129.104.30.34] (HELO mx1.polytechnique.org) (129.104.30.34) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Feb 2012 08:26:11 +0000 Received: from mail-vw0-f43.google.com (mail-vw0-f43.google.com [209.85.212.43]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by ssl.polytechnique.org (Postfix) with ESMTPSA id 24A821400062E for ; Thu, 23 Feb 2012 09:25:49 +0100 (CET) Received: by vbbfq11 with SMTP id fq11so1577076vbb.30 for ; Thu, 23 Feb 2012 00:25:48 -0800 (PST) Received-SPF: pass (google.com: domain of sebastien.brisard@m4x.org designates 10.220.156.72 as permitted sender) client-ip=10.220.156.72; Authentication-Results: mr.google.com; spf=pass (google.com: domain of sebastien.brisard@m4x.org designates 10.220.156.72 as permitted sender) smtp.mail=sebastien.brisard@m4x.org Received: from mr.google.com ([10.220.156.72]) by 10.220.156.72 with SMTP id v8mr177019vcw.45.1329985548120 (num_hops = 1); Thu, 23 Feb 2012 00:25:48 -0800 (PST) MIME-Version: 1.0 Received: by 10.220.156.72 with SMTP id v8mr142719vcw.45.1329985548082; Thu, 23 Feb 2012 00:25:48 -0800 (PST) Received: by 10.52.180.133 with HTTP; Thu, 23 Feb 2012 00:25:48 -0800 (PST) In-Reply-To: <4F45E6F0.9020804@tue.nl> References: <20120222230433.63AC4238889B@eris.apache.org> <4F45E6F0.9020804@tue.nl> Date: Thu, 23 Feb 2012 09:25:48 +0100 Message-ID: Subject: Re: svn commit: r1292572 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution/TriangularDistribution.java From: =?ISO-8859-1?Q?S=E9bastien_Brisard?= To: Commons Developers List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-AV-Checked: ClamAV using ClamSMTP at svoboda.polytechnique.org (Thu Feb 23 09:25:49 2012 +0100 (CET)) X-Org-Mail: sebastien.brisard.1997@polytechnique.org X-Old-Spam-Flag: No, tests=bogofilter, spamicity=0.000001, queueID=6E1581400038A Hi Dennis, > Hi all, > > Now that I look at this code again, should we not attempt to avoid divide= by > zero in case a =3D=3D b, in this method, and perhaps other methods of thi= s > class? > I think the constructor takes care of this special case. > > Also, looking that the Wikipedia article, at > http://en.wikipedia.org/wiki/Triangular_distribution (which is referenced= in > the javadoc of this class), "if (p <=3D (c - a) / (b - a))" should become= "if > (p < (c - a) / (b - a)) " instead. Just to keep it consistent with the > Wikipedia article...? > > Best regards, > Dennis > I really have no opinion on this subject. S=E9bastien --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org