couchbaselabs / gojsonsm

Go implementation of my JSONSM algorithm.
9 stars 7 forks source link

Fixes #99 - int comparison to a large float that overflows an int64 s… #100

Closed nelio2k closed 5 years ago

nelio2k commented 5 years ago

…hould use float comparison

It's possible that we lose some precision w.r.t to the integer when we convert it to a float, but it's potentially less problematic than having a overflow that causes signs to flip, leading to egregious results.