RFR: 8301226: Add clamp() methods to java.lang.Math and to StrictMath [v6]

Tagir F. Valeev tvaleev at openjdk.org
Tue Feb 7 12:53:28 UTC 2023


On Tue, 7 Feb 2023 11:33:12 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:

>> Tagir F. Valeev has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Whitespace fixed
>
> test/jdk/java/lang/Math/Clamp.java line 149:
> 
>> 147:                 {-0.0, 0.0, 0.0, 0.0},
>> 148:                 {0.0, 0.0, 0.0, 0.0},
>> 149:                 {1.0, 0.0, 0.0, 0.0},
> 
> What about adding similar tests for the [-0.0, -0.0] interval?

Added, thanks

> test/jdk/java/lang/Math/Clamp.java line 160:
> 
>> 158:                 {0.0, Double.NaN, 0.0},
>> 159:                 {Double.NaN, 1.0, 0.0},
>> 160:                 {0.0, 0.0, -0.0}
> 
> Perhaps add other empty intervals, like [1.0, -1.0]

Added 1.0, -1.0. Anything else?

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

PR: https://git.openjdk.org/jdk/pull/12428


More information about the core-libs-dev mailing list