MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / is_integer

Method is_integer

CPP/PowerOfFour.cpp:7–10  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5 return (log2(d))/2;
6}
7bool is_integer(float k)
8{
9 return std::floor(k) == k;
10}
11 bool isPowerOfFour(int n) {
12 if(n<=0){
13 return false;

Callers

nothing calls this directly

Calls 1

floorFunction · 0.85

Tested by

no test coverage detected