commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From S├ębastien Brisard <sebastien.bris...@m4x.org>
Subject Re: svn commit: r1292572 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution/TriangularDistribution.java
Date Thu, 23 Feb 2012 08:25:48 GMT
Hi Dennis,
> Hi all,
>
> Now that I look at this code again, should we not attempt to avoid divide by
> zero in case a == b, in this method, and perhaps other methods of this
> 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 <= (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├ębastien


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


Mime
View raw message