FULL PRODUCT VERSION :
A DESCRIPTION OF THE PROBLEM :
When formatting a subnormal double with hexadecimal conversion "a", it is normalized if the precision is specified and less then 14. However it should never be normalized according to the spec:
'a' '\u0061' Requires the output to be formatted in hexadecimal exponential form.
If m is a double value with a subnormal representation then the significand is represented by the characters '0x0.' followed by the hexadecimal representation of the rest of the significand as a fraction. The exponent is represented by 'p-1022'
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
The results are in comments.
System.out.printf("%a\n", 0x0.123p-1022 ); // 0x0.123p-1022
System.out.printf("%1.3a\n", 0x0.123p-1022 ); // 0x1.230p-1026
System.out.printf("%1.15a\n", 0x0.123p-1022 ); // 0x0.123000000000000p-1022
This bug can be reproduced always.