int counter = 0;
while (d.doubleValue() < 1) {
d = new CompatibleBigDecimal(d.movePointRight(1));
counter++;
}
String retStr = d.toCompatibleString() + "E-" + counter;
return retStr;
}
preString = num.substring(0, 1) + "."
+ num.substring(1, num.indexOf("."));
postString = num.substring(num.indexOf(".") + 1, num.length());