title: Why am I able to perform floating point operations inside a Linux kernel module?
body: <p>I'm running on an x86 CentOS 6.3 (kernel v2.6.32) system.</p>
  
  <p>I compiled the following function into a bare-bones character driver module as an experiment to see how the Linux kernel reacts to floating point operations.</p>
  
  <pre><code>static unsigned floatstuff(void){
      float x = 3.14;
      x *= 2.5;
      return x;
  }
  
  ...
  
  printk(KERN_INFO "x: %u", x);
  </code></pre>
  
  <p>The code compiled (which  wasn't expecting) so I inserted the module and checked the log with <code>dmesg</code>. The log showed: <code>x: 7</code>.</p>
  
  <p>This seems strange; I thought you couldn't perform floating point operations in the Linux kernel -- save some exceptions such as <code>kernel_fpu_begin()</code>. How did the module perform the floating point operation?</p>
  
  <p>Is this because I'm on an x86 processor?</p>