public class FloatNumTest {
    public static void main(String[] args){
        double d=1e308;
        int loop=3;
        
        double t=d;
        for(int i=0;i<loop;i++){
            t=t+10;
            System.out.println(t);
        }
        
        System.out.println();
        t=d;
        for(int i=0;i<loop;i++){
           t=t+0.3*d;
           System.out.println(t);
        }

        System.out.print("\nfloat近似计算: ");
        for(int i=0;i<100;i++){
           float f=1.0F/i;
           if(f*i != 1.0F){
               System.out.print(i+"  ");
           }
        }

        System.out.print("\ndouble近似计算: ");
        for(int i=0;i<100;i++){
           double r=1.0/i;
           if(r*i != 1.0){
               System.out.print(i+"  ");
           }
        }

        System.out.println("\n\n不是数值:"+0.0/0.0);
    }
} 
