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
}
    /**
     * Validates the fast asin approximation
     */
    public void testApproximation() {
        double worst = 0;
        double old = Double.NEGATIVE_INFINITY;
        for (double x = -1; x < 1; x += 0.00001) {
            double ex = Math.asin(x);
            double actual = ScaleFunction.fastAsin(x);
            double error = ex - actual;
            
            assertEquals("Bad approximation", 0, error, 1e-6);
            assertTrue("Not monotonic", actual >= old);
            worst = Math.max(worst, Math.abs(error));
            old = actual;
        }
        assertEquals(Math.asin(1), ScaleFunction.fastAsin(1), 0);
    }
    /**
     * Validates that the forward and reverse scale functions are as accurate as intended.
     */
    public void testInverseScale() {
        for (ScaleFunction f : ScaleFunction.values()) {
            double tolerance = f.toString().contains("FAST") ? 2e-4 : 1e-10;
            for (double n : new double[] { 1000, 3_000, 10_000 }) {
                double epsilon = 1.0 / n;
                for (double compression : new double[] { 20, 100, 1000 }) {
                    double oldK = f.k(0, compression, n);
                    for (int i = 1; i < n; i++) {