jbellis opened a new pull request, #12281: URL: https://github.com/apache/lucene/pull/12281
Cosine of two equal vectors is exactly 1, but we're losing too much precision on large-dimension vectors and ending up with NaN. (Presumably this does bad things for vectors that are not exactly equal as well.) This PR adds error checking (if similarity results in NaN or infinity, try to show where it came from), adds a failing test, and updates the similarity functions to use double precision math internally. (They continue to return float; the signatures do not change.) -- 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