ChrisHegarty commented on code in PR #12727: URL: https://github.com/apache/lucene/pull/12727#discussion_r1375316778
########## lucene/core/src/java/org/apache/lucene/index/VectorSimilarityFunction.java: ########## @@ -70,7 +74,11 @@ public float compare(byte[] v1, byte[] v2) { COSINE { @Override public float compare(float[] v1, float[] v2) { - return (1 + cosine(v1, v2)) / 2; + double cosine = cosine(v1, v2) + 1.0; Review Comment: It's fine, but why widen to double here? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org