RFR: JDK-8295391: Add discussion of binary <-> decimal conversion issues [v8]

Joe Darcy darcy at openjdk.org
Sat Nov 18 00:56:32 UTC 2023


On Wed, 8 Nov 2023 18:41:53 GMT, Eirik Bjorsnos <duke at openjdk.org> wrote:

>> Joe Darcy has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Small clean ups.
>
> src/java.base/share/classes/java/lang/Double.java line 209:
> 
>> 207:  * decimal conversion. While integer values can be exactly represented
>> 208:  * in any base, which fractional values can be exactly represented is
>> 209:  * a function of the base. For example, in base 10, 1/3 is a repeating
> 
> Could the first sentence be simplified and "de-aspectized"? Suggestion: "..trace back to conversions between binary and decimal representations".
> 
> The second sentence has a suspicious while/which pairing and "represented is" should probably be "represented as". Suggestion: "While integer values can be exactly represented in any base, fractional values can only be exactly represented as a function of the base."

Thanks for the close reading; I made another few passes over the text based on your comments.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16566#discussion_r1398018112


More information about the core-libs-dev mailing list