jpountz commented on PR #13186: URL: https://github.com/apache/lucene/pull/13186#issuecomment-2007653367
@rishabhmaurya Actually I'm not comfortable with passing a comparison function that is not transitive, as with iter=1, this would give 1.2 = 1.6 (since they differ by less than 0.5) and 1.6 = 2.0 but 1.2 != 2.0. I don't remember if our selection algorithm has any assumptions about the comparison function, but in any case I'd rather prefer the comparison function to be well-behaved. What about comparing rounded values instead, e.g. `int cmp = Float.compare(Math.round(pivot / iter * 2), Math.round(bias / iter * 2))`? -- 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