Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.15.7, 6.4.0 Beta1
-
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.