public static int eval(double d)
      {
      
         if(d<=1.2)
            return 0;
         if(d<=1.8)
            return 1;
         if(d<=2.3)
            return 2;
         if(d<=2.6)
            return 3;
         if(d<=2.7)
            return 4;
         if(d<=2.8)
            return 5;
         if(d<=2.9)
            return 6;
         if(d<=2.96)
            return 7;
         if(d<=2.98)
            return 8;
         else
            return 9;
      }