blob: 54bd4d20c3e1205769d0de67f0efcbcc27994f4d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
int power_of_two(int test)
{
int limit = 8192;
int compare = 1;
// post("testing what we thing is an int:%d",test);
do {
if(test == compare){
// post("good power of 2 found!");
return 1;
}
compare *= 2;
} while (compare <= limit);
return 0;
}
// we think the above function is shadowed somewhere else
int fftease_power_of_two(int test)
{
int limit = 8192;
int compare = 1;
// post("testing what we thing is an int:%d",test);
do {
if(test == compare){
// post("good power of 2 found!");
return 1;
}
compare *= 2;
} while (compare <= limit);
return 0;
}
|