On Tue, 6 Apr 2021 22:56:22 GMT, Joe Darcy <da...@openjdk.org> wrote:

>> Ian Graves has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Adding BigDecimal equivalents to tests
>
> test/jdk/java/util/Formatter/BigDecimalRounding.java line 44:
> 
>> 42:     public static void testBigDecimalRounding() {
>> 43:         var res1 = String.format("%g", 0.00009999999999999995);
>> 44:         var res2 = String.format("%g", 0.00009999999f);
> 
> To avoid possible vagaries in decimal -> binary conversion of double values, 
> I suggest also testing against a BigDecimal directly rounded to the precision 
> in question.

Good thought, thanks.

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

PR: https://git.openjdk.java.net/jdk/pull/3363

Reply via email to