public boolean prob(double x) {
    if (x >= 1) {
      return true;
    }
    if (x <= 0) {
      return false;
    }
    double eps = 0.000000001;
    double a = 0, b = 1;
    do {
      boolean pb = prob();
      double center = (a + b) / 2;
      if (Math.abs(x - center) < eps) {
        return pb;
      }
      if (x > center && pb) {
        return true;
      }
      if (x < center && !pb) {
        return false;
      }
      if (x > center) {
        a = center;
      }
      else {
        b = center;
      }
//      x = (x>0.5? (x-0.5):x)*2;
      eps *= 2;
      exp_value++;
    }
    while (true);
  }