title: warning: incompatible implicit declaration of built-in function log2
body: <p>So we have this program in C, we need to use the base-2 logarithmic function, to get the base 2 logarithm of n.
  Here's the code:</p>
  
  <pre><code>#include &lt;math.h&gt;
  
  int partSize(int n) {
      return log2(n);
  }
  </code></pre>
  
  <p>But when compiling, it gives us the following warning.</p>
  
  <blockquote>
    <p>sim.c: In function <code>partSize</code> : sim.c:114: warning: incompatible
    implicit declaration of built-in function <code>log2</code></p>
  </blockquote>
  
  <p>This is the command we use</p>
  
  <pre><code> gcc $file -o $name.out -lm 
  </code></pre>