title: how to implement pow(double x, double y)?
body: <p>I know how to impelment pow(double x, int y)</p>
  
  <pre><code>public class Solution {
      public double myPow(double x, int n) {
          if (n == 0)
              return 1;
  
          if (n % 2 == 0) {
              return myPow(x * x, n / 2);
          } else {
              if (n &gt; 0)
                  return x * myPow(x, n - 1);
              else
                  return 1 / x * myPow(x, n + 1);
          }
      }
  }
  </code></pre>
  
  <p>But how to make it handle double y?</p>