[jira] [Closed] (MATH-956) Hardcoded numbers in "LevenbergMarquardtOptimizer"

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jira] [Closed] (MATH-956) Hardcoded numbers in "LevenbergMarquardtOptimizer"

Gilles Sadowski (Jira)

     [ https://issues.apache.org/jira/browse/MATH-956?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Luc Maisonobe closed MATH-956.

Closing issue as version 3.2 has been released on 2013-04-06.

> Hardcoded numbers in "LevenbergMarquardtOptimizer"
> --------------------------------------------------
>                 Key: MATH-956
>                 URL: https://issues.apache.org/jira/browse/MATH-956
>             Project: Commons Math
>          Issue Type: Task
>    Affects Versions: 3.1.1
>            Reporter: Gilles
>            Priority: Minor
>             Fix For: 3.2
> The class contains numbers "2.2251e-308" and "2.2204e-16".
> The former is the "SAFE_MIN" defined in class "Precision".
> The latter is documented as
> {noformat}
> 2.2204e-16 is the machine epsilon for IEEE754
> {noformat}
> However, the "EPSILON" defined in class "Precision" is equal to "1.1102230246251565E-16" (i.e. half the above number). This requires clarification.
> I would remove the seemingly incorrect comment (if we assume that the correct definition is in the comment for "EPSILON" in "Precision") and replace the hard-coded values with
> {noformat}
> 2 * Precision.EPSILON
> {noformat}
> Do you agree?

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira