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

-1 * 0 is not -0

    XMLWordPrintable

    Details

      Description

      I have to support negative zeroes in some of code, it works well even when going back and forth between QML and c++ but there seems to be a bug in the QML engine;

      -1 * 0 doesn't return a negative zero, when tested in QML with Object.is or in C++ with std::signbit.
      Object.is(-1 * 0, -0) returns false

      I tried the above in my Firefox and Chrome browsers and both return true, the expected result.

      Note that Object.is(-x, -0) correctly returns true when x is 0.

        Attachments

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

          Activity

            People

            Assignee:
            qtqmlteam Qt Qml Team User
            Reporter:
            grecko Pierre-Yves Siret
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes