pgvector.git / summary / log / commit / refs
commit 3126fbdb6f24fe32fe6ace7a83d72c4fdabab69c
Author: Andrew Kane <andrew@ankane.org>
Date: Thu Oct 10 00:04:25 2024 +0000
Use double for distance [skip ci]
src/hnswutils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/hnswutils.c b/src/hnswutils.c
index a7eb8193..856c3098 100644
--- a/src/hnswutils.c
+++ b/src/hnswutils.c
@@ -485,7 +485,7 @@ HnswLoadElementFromTuple(HnswElement element, HnswElementTuple etup, bool loadHe
/*
* Calculate the distance between values
*/
-static inline float
+static inline double
HnswGetDistance(Datum a, Datum b, FmgrInfo *procinfo, Oid collation)
{
return DatumGetFloat8(FunctionCall2Coll(procinfo, collation, a, b));
[parent: f4b67b078f8d]