if a=-2147483648(INT_MIN), -a should be 2147483648,bigger than 2147483647(INT_MAX),

and in vs2013,the result would still be -2147483648(INT_MIN).

class Solution {

public:

```
double myPow(double x, int n) {
if (n < 0) return 1.0 / power(x, -n); //this line
else return power(x, n);
}
```

private:

```
double power(double x, int n) {
if (n == 0) return 1;
double v = power(x, n / 2);
if (n % 2 == 0) return v * v;
else return v * v * x;
}
```

};