Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-956

Hardcoded numbers in "LevenbergMarquardtOptimizer"

Rank to TopRank to BottomVotersWatch issueWatchersConvert to sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.1
    • Fix Version/s: 3.2
    • Labels:
      None

      Description

      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

      2.2204e-16 is the machine epsilon for IEEE754
      

      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

      2 * Precision.EPSILON
      

      Do you agree?

        Attachments

          Activity

          $i18n.getText('security.level.explanation', $currentSelection) Viewable by All Users
          Cancel

            People

            • Assignee:
              Unassigned
              Reporter:
              erans Gilles Sadowski

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment