With the backport of TDigest, the build started failing compiling with Java 20 with the following error:

```
> Task :libs:elasticsearch-tdigest:compileJava FAILED
../elasticsearch/libs/tdigest/src/main/java/org/elasticsearch/tdigest/SortingDigest.java:57: warning: [lossy-conversions] implicit cast from long to int in compound assignment is possibly lossy
            valuesToAddCount += other.size();
                                          ^
error: warnings found and -Werror specified
1 error
1 warning

```
Java 20 is more picky about lossy conversions,

libs/tdigest/src/test/java/org/elasticsearch/tdigest/ScaleFunctionTests.java
import java.util.Locale;
import java.util.Map;
import static java.lang.Math.abs;
import static java.lang.Math.max;
/**
 * Validate internal consistency of scale functions.
 */
public class ScaleFunctionTests extends ESTestCase {
    public void asinApproximation() {
        for (double x = 0; x < 1; x += 1e-4) {
            assertEquals(Math.asin(x), ScaleFunction.fastAsin(x), 1e-6);
        }
        assertEquals(Math.asin(1), ScaleFunction.fastAsin(1), 0);
        assertTrue(Double.isNaN(ScaleFunction.fastAsin(1.0001)));
    }
    /**
     * Test that the basic single pass greedy t-digest construction has expected behavior with all scale functions.
     * <p>
     * This also throws off a diagnostic file that can be visualized if desired under the name of
     * scale-function-sizes.csv
     */
    public void testSize() {
        for (double compression : new double[] { 20, 50, 100, 200, 500, 1000, 2000 }) {
            for (double n : new double[] { 10, 20, 50, 100, 200, 500, 1_000, 10_000, 100_000 }) {
                Map<String, Integer> clusterCount = new HashMap<>();
                for (ScaleFunction k : ScaleFunction.values()) {
                    if (k.toString().equals("K_0")) {
                        continue;
                    }
                    double k0 = k.k(0, compression, n);