Updated comment [skip ci]

This commit is contained in:
Andrew Kane
2023-03-21 11:55:26 -07:00
parent b69ac51ad7
commit 4e68f4f800

View File

@@ -568,7 +568,7 @@ cosine_distance(PG_FUNCTION_ARGS)
normb += bx[i] * bx[i];
}
/* sqrt(a) * sqrt(b) == sqrt(a * b) */
/* Use sqrt(a * b) over sqrt(a) * sqrt(b) */
PG_RETURN_FLOAT8(1 - (distance / sqrt(norma * normb)));
}