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
It seems that Go's behavior when casting Positive Infinity to uint32 is architecture specific. This causes theApproximatedSize calculation to return an inconsistent value between architectures.
In amd64, it prints 0, while if you run it on arm64, it prints the max value for uint32.
For a smaller example:
fmt.Println(uint32(math.Inf(1)))
Is equivalent.
I'd expect a saturated bloom to return a very high number and not zero, so I'd propose checking first for a saturated bloom and returning max uint32 explicitly.
It seems that Go's behavior when casting Positive Infinity to uint32 is architecture specific. This causes the
ApproximatedSize
calculation to return an inconsistent value between architectures.If you run this:
In amd64, it prints
0
, while if you run it on arm64, it prints the max value foruint32
.For a smaller example:
Is equivalent.
I'd expect a saturated bloom to return a very high number and not zero, so I'd propose checking first for a saturated bloom and returning max uint32 explicitly.
See: golang/go#56023
The text was updated successfully, but these errors were encountered: