Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-90444

Math.round() and qRound() have different behavior on ARM64

    XMLWordPrintable

    Details

      Description

      With ARM64 optimization (aa136d46e100e65f0d9326ac9319de95673cd6d7) added to qRound, its behavior in now different from Math.round

      Math.round(0.49999999999999994) results 1
      qRound(0.49999999999999994) results 0
      

      This results failed test on qtquickcontrols2

      agent:2021/01/18 15:03:27 build.go:379: 2: FAIL!  : tst_controls::Basic::ScrollBar::test_snapMode_mouse(SnapAlways2) Compared values are not the same
      agent:2021/01/18 15:03:27 build.go:379: 2:    Actual   (): 0
      agent:2021/01/18 15:03:27 build.go:379: 2:    Expected (): 0.18000000000000002
      agent:2021/01/18 15:03:27 build.go:379: 2:    Loc: [/home/qt/work/qt/qtquickcontrols2/tests/auto/controls/data/tst_scrollbar.qml(605)] 

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              qt.team.quick.subscriptions Qt Quick and Widgets Team
              Reporter:
              sapiippo Samuli Piippo
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes