[
https://issues.apache.org/jira/browse/MATH-746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13213636#comment-13213636
]
Gilles commented on MATH-746:
-----------------------------
"FindBugs" complains about {{TriangularDistribution}} containing the line
marked "HERE".
{code}
public double inverseCumulativeProbability(double p)
throws OutOfRangeException {
if (p < 0.0 || p > 1.0) {
throw new OutOfRangeException(p, 0, 1);
}
if (p == 0.0) {
return a;
}
if (p == 1.0) {
return b;
}
final double pc = (c - a) / (b - a);
if (p == pc) { // <-- HERE
return c;
}
if (p < pc) {
return a + FastMath.sqrt(p * (b - a) * (c - a));
}
return b - FastMath.sqrt((1 - p) * (b - a) * (b - c));
}
{code}
I think that this {{if}}-block should be removed and the test that follows it
should read:
{code}
if (p <= pc) {
// etc.
}
{code}
> Things to do before releasing 3.0
> ---------------------------------
>
> Key: MATH-746
> URL: https://issues.apache.org/jira/browse/MATH-746
> Project: Commons Math
> Issue Type: Task
> Reporter: Gilles
> Priority: Blocker
> Fix For: 3.0
>
>
> This issue is meant to contain a list of tasks to be completed before the
> release.
> * Remarks to be added to the *release notes*:
> ** Experimental code: {{BOBYQAOptimizer}} (cf. MATH-621) (/) (r1291896)
> *** Many code paths untested
> *** Looking for volunteers to improve the code readability, robustness and
> performance
> *** Looking for volunteers to extend the test suite
> ** {{FastMath}} is not always faster than {{Math}} (issue MATH-740) (/)
> (r1291896)
> ** List of new features
> * Create a "release branch"
> * Disable CheckStyle scanning of {{BOBYQAOptimizer}} (/) (r1244855)
> * Comment out "print" statements in {{BOBYQAOptimizerTest}} (/) (r1244975)
> * Remove unit test class {{BatteryNISTTest}}
> * Remove class {{PivotingQRDecomposition}}
> * Comment out "print" statement in {{SymmLQTest}} (/) (r1244992, removed in
> r1244996)
> * Findbugs:
> ** org.apache.commons.math3.analysis.solvers.BaseSecantSolver (/) (r1292245)
> ** org.apache.commons.math3.distribution.TriangularDistribution
> ** org.apache.commons.math3.optimization.direct.BOBYQAOptimizer (cannot be
> corrected before release)
> ** org.apache.commons.math3.stat.regression.RegressionResults (/) (r1292251
> and r1292270)
> * Check the user guide
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira