I tried many ways to convert a Double to it's exact decimal String with String.format() and DecimalFormater and I found this so far :
String s = "-.0000000000000017763568394002505";
Double d = Double.parseDouble(s) * 100;
System.out.println((new java.text.DecimalFormat("###########################.################################################################################")).format(d));
I'm not really a fan of my solution because it's ugly to me to make a huge pattern that does not covers all the cases.
Do you have another way to make this ?
I really want to have ALL the decimals, without scientific notation, without trailing zeros.
Thanks
P.S.: I need this without external libraries and in Java 1.7.