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

FastMath does not handle all special cases correctly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2, 3.0
    • 2.2, 3.0
    • None
    • 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

        1. MATH-483.patch
          3 kB
          Sebb
        2. MATH-483-generic.patch
          4 kB
          Sebb

        Activity

          People

            Unassigned Unassigned
            sebb Sebb
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: