-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Message type Int64 and UInt64 are greater than Number.MAX_SAFE_INTEGER #103
Comments
We'd better combine this with #51 |
The maximum integer JavaScript can represents is Number.MAX_SAFE_INTEGER, which is 2^53 - 1. But ROS can use uint64_t to represent a value, which has maximum value of 2^64 - 1.Considering the fact that |
I suggest maintaining the compatibility with other ros clients, which have the ability to represent Int64/UInt64. To achieve this, we have to store the int value as a string and let the user balance the interest, when the actual value is greater than |
Let me close this issue as we don't want lost any information from other client when using |
It's acceptable as the JavaScript integer implementation limit. |
The
Int64
andUInt64
message type use string as the data property for inside representations. This might not a problem. However, part of numbers in this size are greater thanNumber.MAX_SAFE_INTEGER
. So the data precision may be lost when delivering aInt64
orUInt64
number from publisher to subscription.The text was updated successfully, but these errors were encountered: