} else if (num.indexOf(".") != -1) {
int pos = num.indexOf(".");
preString = num.substring(0, 1) + "."
+ num.substring(1, num.indexOf("."));
CompatibleBigDecimal d = new CompatibleBigDecimal(num);
if (d.doubleValue() < 1 && d.doubleValue() != 0) {
// it is a very small value, ie 1.0E-10
int counter = 0;
while (d.doubleValue() < 1) {
d = new CompatibleBigDecimal(d.movePointRight(1));
counter++;