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

-1 * 0 is not -0

    XMLWordPrintable

Details

    • f59af767a (dev), 2a39659ae (6.5)

    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

            fabiankosmale Fabian Kosmale
            grecko Pierre-Yves Siret
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes