RFR: 8325438: Add exhaustive tests for Math.round intrinsics [v3]

Hamlin Li mli at openjdk.org
Wed Mar 13 16:32:51 UTC 2024


On Wed, 13 Mar 2024 06:55:55 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> It's testing following cases:
>> 1. all the `e` range, e.g. for double it's 11 bits, for float it's 8 bits
>> 2. for `f` I add a special value `0` explicitly `fis[fidx++] = 0;`
>> 3. for sign, both `+` and `-` are tested.
>> 
>> So, yes, it will test cases like `+/- 0, infty, NaN`.
>
> Can you refactor or at least comment the code a little better, or use more expressive variable names?
> I'd have to spend a bit of time to understand your generation method here, and if I think that it is exhaustive and covers the special cases with enough frequency.

Sure, I will add some comments to illustrate how it works.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17753#discussion_r1523575330


More information about the hotspot-compiler-dev mailing list