RFR: 8373722: [TESTBUG] compiler/vectorapi/TestVectorOperationsWithPartialSize.java fails intermittently

Xiaohong Gong xgong at openjdk.org
Wed Dec 24 05:04:08 UTC 2025


On Wed, 24 Dec 2025 03:06:35 GMT, Jie Fu <jiefu at openjdk.org> wrote:

> > We used the `Math.ulp(sum) * 10` to calculate the tolerance, which means the difference of expected and actual value is inside of 10 ULP around the value of `sum`.
> 
> The question here is what do you mean by `expected value`? Do you mean the sequential scalar floating point add with rounding errors will produce the expected value? Or do you mean the golden value in math?
> 
> Just consider the following case
> 
> ```
> 1000.0f + Float.MAX_VALUE - Float.MAX_VALUE
> ```
> 
> The sequential scalar floating add will result 0.0f. However, the golden value in math should be 1000.0f.

I think we should refer to the java ref spec, that calculates the values in sequential order, right?

-------------

PR Comment: https://git.openjdk.org/jdk/pull/28960#issuecomment-3688687630


More information about the hotspot-compiler-dev mailing list