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

FastMath does not handle all special cases correctly

    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 has some issues with special cases such as +0.0 and -0.0.

      Here are the double cases so far found:

      abs(-0.0) expected:<0.0> but was:<-0.0>
      signum(-0.0) expected:<-0.0> but was:<0.0>
      asin(-0.0) expected:<-0.0> but was:<0.0>
      atan(-0.0) expected:<-0.0> but was:<0.0>
      log10(-0.0) expected:<-Infinity> but was:<NaN>
      toDegrees(-0.0) expected:<-0.0> but was:<0.0>
      toRadians(-0.0) expected:<-0.0> but was:<0.0>
      ulp(-Infinity) expected:<Infinity> but was:<NaN>

      And float cases:
      abs(-0.0) expected:<0.0> but was:<-0.0>

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sebb@apache.org Sebb
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: