25 Sep
2007
25 Sep
'07
7:42 p.m.
Hi, I believe the attached patch fixes the trailing zero problem mentioned in several bugs (in addition to $SUBJECT), including 4511638, 6575880, and 4191279. The problem arises because sun.misc.FloatingDecimal.getChars and sun.misc.FloatingDecimal.dtoa disagree about when numbers are represented in E-form and when they are not. As a result, dtoa stuffs one too many numbers (a '0' in this case) into digits[], and getChars blindly returns them to FloatingDecimal.toJavaFormatString. I have also attached a jtreg test for this, based on various testcases given in several bug requests. Keith