You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
splitFloat64 is the culprit here. Regardless of if the bug is fixed within that function, would it make sense to prefer to use TypedArray (Float64Array) if it's available? I noticed that protobufjs takes this approach.
The text was updated successfully, but these errors were encountered:
What version of protobuf and what language are you using?
Version: v3.9.2
Language: Javascript
What operating system (Linux, Windows, ...) and version?
Any (but I am specifically using macOS 10.14.5).
What runtime / compiler are you using (e.g., python version or gcc version)
Node 10.16.3.
What did you do?
I encoded the double
3.9999999999999997
in a protobuf message.What did you expect to see
I expected the field's value to be encoded as
3.9999999999999997
(i.e.,[ 255, 255, 255, 255, 255, 255, 15, 64 ]
).What did you see instead?
The field's value was encoded as
7.999999999999999
(i.e.,[ 255, 255, 255, 255, 255, 255, 31, 64 ]
)Here's some code that demonstrates the issue:
splitFloat64
is the culprit here. Regardless of if the bug is fixed within that function, would it make sense to prefer to use TypedArray (Float64Array
) if it's available? I noticed thatprotobufjs
takes this approach.The text was updated successfully, but these errors were encountered: