Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use float-epsilon calculation in Sabre best scores (#9117)
This should not meaningfully affect any small-scale outputs, but at larger scales, there are floating-point instabilities that can make the "best swaps" set miss swaps that are logically at the same score as others. This does not (cannot) fully stabilise us against all minor floating-point rounding errors in calculations; the order of iteration through the swaps can still technically change the swap set, for example if three swaps with relative differences `{0, 0.8, 1.6} * BEST_EPSILON` are encountered in a different orders. The float epsilon is chosen to be significantly larger than the actual magnitude of fluctuations, and significantly smaller than the changes caused by all the actual components of scoring, in order to mitigate this effect. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information