error: invalid operands to binary expression 'float' : <p>Hello and sorry if this question has been asked before, but I'm working on the Josephus problem and this is the code that I´ve written.</p>

<pre><code>#include&lt;stdio.h&gt;
#include&lt;cs50.h&gt;
#include&lt;math.h&gt;

int main(void)

{
    printf("Number of people: ");
    float f=GetFloat();
    const int a=pow(2,floor(log(f)/log(2)));
    float c= 2*(f-2^a)+1;
    printf("%f\n", c);

}
</code></pre>

<p>When I try to compile it it gives me this error message.</p>

<pre><code>clang -ggdb3 -O0 -std=c99 -Wall -Werror    Josephus.c  -lcs50 -lm -o Josephus
Josephus.c:11:20: error: invalid operands to binary
      expression ('float' and 'float')
    float c= 2*(f-2^a)+1;
                ~~~^~
</code></pre>

<p>The equation I'm trying to write in the code is c = 2(f – 2^a) + 1
Where "c" is the number I'm looking for, "f" is the number of people and "a" is the largets power of 2 smaller than f.</p>

<p>Sorry for any and all grammatical mistakes and my lack of knowledge of the topic, I'm new to programming. Cheers!</p>
