[Interest] JS numbers to qint64
Ilya Diallo
ilya.diallo at gmail.com
Thu Jul 13 10:28:36 CEST 2017
2017-07-13 8:03 GMT+02:00 Shantanu Tushar <shaan7in at gmail.com>:
> Thanks for the reply everyone, so the takeaway is so always store 64-bit
> ints as strings in JavaScript, I'll start making that change in our
> codebase.
>
> However, I'm still curious on how `console.log` got the output right and
> it the precision loss only happened when it went from QML/JS to C++ . Any
> idea?
>
My best guess: the C++ code is doing some dark magic qint64 <=> double
conversion that saves a bunch of nanoseconds but sacrifices 1 bit of
precision.
Ilya.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170713/c1a8bf79/attachment.html>
More information about the Interest
mailing list