presto-main/src/main/java/io/prestosql/cost/JoinStatsRule.java/JoinStatsRule/firstNonNaN
class JoinStatsRule:    private static double firstNonNaN(double... values)
    {
        for (double value : values) {
            if (!isNaN(value)) {
                return value;
            }
        }
        throw new IllegalArgumentException("All values are NaN");
    }