On Thu, 12 Jun 2025 22:52:21 GMT, Justin Lu <j...@openjdk.org> wrote:
>> Unfortunately some check is required (a test fails), but I now realize what >> I had was wrong. The issue is that on line 1084 >> (https://github.com/openjdk/jdk/pull/25644/files#diff-79e6fd549b5ec5e7f49658581beddcb07fcbb0c09ae8e1117c385b66514da6d2R1084)) >> exp can overflow and become positive again. I've updated the check to avoid >> the overflow. > > Ah got it, I see your point. We would have goten underflow in > `ASCIIToBinaryConverter.doubleValue()` for some extreme cases without a > check. > > Is there a specific example you have that requires the switch to the newer > check? Adding a comment along those lines might be helpful. Actually, I > thought DigitList caps `decimalAt` to Integer.MIN/MAX, so then the first > check you had would have been fine. (Maybe I am missing something?) I don't have a specific example, so I've reverted to my original check. I'm a bit unsettled by the check for an extreme value later in `doubleValue()` comparing against `MIN_DECIMAL_EXPONENT - 1` ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25644#discussion_r2145942325