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

Precision.equals says that 4 equals -1

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.3
    • 3.6.1
    • None
    • None
    • Java 1.8, Eclipse, version 3-3.3

    Description

      The method 
      boolean org.apache.commons.math3.util.Precision.equals(double x, double y, double eps)
      is returning true when I call it with the parameters: 4.0, -1.0, 10E-14.
      Same result for compareTo(...)
      Below the code:

      https://pastebin.com/XQ3RTuTq

      Attachments

        Activity

          People

            Unassigned Unassigned
            MoneySucks Radu-Cristian Neagoe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: