title: Is IEEE-754 representation used in C?
body: <p>I have to encode the electron charge, which is -1.602*10<sup>-19</sup> C, using IEEE-754. I did it manually and verified my result using <a href="https://www.h-schmidt.net/FloatConverter/IEEE754.html" rel="nofollow noreferrer">this</a> site. So I know my representation is good. My problem is that, if I try to build a C program showing my number in scientific notation, I get the wrong number.</p>
  <p>Here is my code:</p>
  <pre class="lang-c prettyprint-override"><code>#include &lt;stdio.h&gt;
  int main(int argc, char const *argv[])
  {
      float q = 0xa03d217b;
      printf(&quot;q = %e&quot;, q);
      return 0;
  }
  </code></pre>
  <p>Here is the result:</p>
  <pre class="lang-none prettyprint-override"><code>$ ./test.exe
  q = 2.688361e+09
  </code></pre>
  <p>My question: Is there another representation that my CPU might be using internally for floating point other than IEEE-754?</p>