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

FastMath.max(50.0f, -50.0f) => -50.0f; should be +50.0f

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2, 3.0
    • Fix Version/s: 2.2, 3.0
    • Labels:
      None

      Description

      FastMath.max(50.0f, -50.0f) => -50.0f; should be +50.0f.

      This is because the wrong variable is returned.

      The bug was not detected by the test case "testMinMaxFloat()" because that has a bug too - it tests doubles, not floats.

        Attachments

          Activity

            People

            • Assignee:
              sebb Sebb
              Reporter:
              sebb Sebb
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: