Fix test failures due to floating point precision

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.4.0-RC1, 1.4.0
    • Affects Version/s: 1.4.0-beta1
    • Component/s: None
    • None
    • Environment:
      Alpine Linux 3.7.0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Running the test suite on Alpine Linux produced a couple of test failures due to floating point precision. We can easily resolve these by using numbers that can be better represented in floating point.

      $ cat tests/bson/bson-toPHP-003.diff
      031+     float(3.1400000000003)
      031-     float(3.14)
      245+     float(3.1400000000003)
      245-     float(3.14)
      
      $ cat tests/bson/bug0341.diff
      024+     float(3.1400000000003)
      024-     float(3.14)
      

              Assignee:
              Jeremy Mikola
              Reporter:
              Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: