```
public double myPow(double x, int n) {
double p = x;
if (n == 0){
return 1;
}
else{
for (double i = 1; i < n; i++){
p *= x;
}
if (n < 0){
return 1/p;
}
else{
return p;
}
}
}
}
For input of: 34.00515 -3, I return 0.02941 instead of 0.00003;
```