好像只能用程序写了
double a=1111112.123;
double b=1111112.123;
String temp=Double.toString(a*b);
System.out.println(Double.toString(a*b));
if(temp.indexOf("E")>0){
System.out.println(temp.indexOf("E"));
String temp1=temp.substring(temp.indexOf("E")+1);
System.out.println(temp1);
String temp2=temp.substring(0,temp.indexOf("E"));
System.out.println(temp2);
}
double a=1111112.123;
double b=1111112.123;
String temp=Double.toString(a*b);
System.out.println(Double.toString(a*b));
if(temp.indexOf("E")>0){
System.out.println(temp.indexOf("E"));
String temp1=temp.substring(temp.indexOf("E")+1);
System.out.println(temp1);
String temp2=temp.substring(0,temp.indexOf("E"));
System.out.println(temp2);
}
...
DecimalFormat df=new DecimalFormat("##0.00##");
String str;
double d=5.2089032519999996E7;
str=df.format(d);
System.out.println(str);
package test;import java.math.BigDecimal;public class A1 {
public A1() {
double d=5.2089032519999996E7;
BigDecimal bd = new BigDecimal(d);
System.out.println(d);
System.out.println(bd);
}
public static void main(String args[]) {
A1 a = new A1();
}
}