Shouldn't distances for all metrics be non-negative? When I used the Inner Product as a distance measure, I found that it could produce negative values when using Index.search().
The same behavior is observed in the C# binding, so I suspect the same will occur when using the C99 interface.
Describe the bug
Shouldn't distances for all metrics be non-negative? When I used the Inner Product as a distance measure, I found that it could produce negative values when using
Index.search()
.The same behavior is observed in the C# binding, so I suspect the same will occur when using the C99 interface.
Steps to reproduce
Expected behavior
Distance is always >=
-epsilon
, where epsilon is very small.USearch version
v2.3.1
Operating System
Ubuntu 22.04
Hardware architecture
x86
Which interface are you using?
Python bindings
Contact Details
No response
Is there an existing issue for this?
Code of Conduct