[Interest] JS numbers to qint64

Konrad Rosenbaum konrad at silmor.de
Wed Jul 12 12:00:37 CEST 2017


On Wed, July 12, 2017 11:53, Shantanu Tushar wrote:
> and I see this output-
>
> qml: Opening 5762702576189441
> Opening 5762702576189442
>
> As you can see the number changes. What am I doing wrong?

...you are using JavaScript numbers. All numbers is JS are 32bit floats,
so naturally when you get to high numerical values you lose precision.
Unless the numerical value is somehow important to the user: try to wrap
those numbers in something more opaque.


  Konrad




More information about the Interest mailing list