Repository navigation
Conversation
|
Thanks a lot for the PR! |
|
You're right : overflows may produce wrong counts when :
I'll take a look. |
ea9c823 to
dbe20fe
Compare
dbe20fe to
74ebc8b
Compare
|
I guess all remaining overflow issues have been fixed with last commits. |
|
Sorry @MaxGraey, I don't know what happend, looks like I did something that deleted your commit proposal (or there was a github issue) with my comment... I was saying that the bitwise shift operation won't work as is. So I guess that we should write |
|
@lcallarec a little bit ashamed to have taken all this time. Thanks a lot for having raised this issue. |
Hey,
This PR fixes an integer overflow issue in both AssemblyScript & Typescript implementations.
In short : on an
unsigned integer, when overflow occurs, the value won't be read as a negative integer.Please note that in the current implementation, the user could create an Histogram with a signed internal bucket of type
IntXArray; an issue will also occurs and this PR doesn't fix that case. :)Note also that I didn't find a way to test the assembly version in assembly folder : the tested method throws, and it seems that try / catch aren't supported yet