Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-1098

Fix test failures due to floating point precision

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 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

      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:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: