Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/codemistic/Data-Structures-and-Algorithms
/ myPow
Method
myPow
CPP/Problems/pow(x,n).cpp:11–15 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
9
return d*d;
10
}
11
double myPow(double x, int n) {
12
13
if(n>0){return power(x,n);}
14
return 1/power(x,n);//a^-1=1/a
15
}
16
};
Callers
nothing calls this directly
Calls
1
power
Function · 0.50
Tested by
no test coverage detected