code: public static double pow2(int x)
      {
          if(x > Double.MAX_EXPONENT)
              return Double.POSITIVE_INFINITY;
          if(x < Double.MIN_EXPONENT)
              return 0;
          return longBitsToDouble((x+1023L)<<52);
      }
docs: Computes 2<sup>x</sup> exactly be exploiting the IEEE format
  @param x the integer power to raise 2 too
  @return 2<sup>x</sup>