What's wrong with my sol


#1

double Log( double n , int A)
{
return log(n) / log(A);
}

int Solution::isPower(int x) {
if(x == 1){
return 1;
}
double P = INT_MAX;
for(int A=2; P > 1 ; A++){
P = Log(x,A);
if(P == floor§ && P>1){
return 1;
}
}
return 0;

}