Added comment [skip ci]

This commit is contained in:
Andrew Kane
2023-03-21 11:43:30 -07:00
parent 29c7af5d18
commit b69ac51ad7

View File

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