title: Bitwise operation OR on (double) in Java not possible, possible in JavaScript
body: <p>Here is outputs from Google Chrome Javascript Console.<br>
  <img src="https://i.stack.imgur.com/gefcZ.png" alt="http://i.stack.imgur.com/gefcZ.png"></p>
  
  <p>Here is outputs from DrJava Java Console.<br>
  <img src="https://i.stack.imgur.com/bQ7hS.png" alt="http://i.stack.imgur.com/bQ7hS.png"></p>
  
  <p>My Javascript code is </p>
  
  <pre><code>(baseCPUCyclesPerIteration - CPUCyclesTotalRoundoff) | 0
  </code></pre>
  
  <p>Seems to compile fine in Java if both variables are integers but apparently they are doubles in javascript. Even though</p>
  
  <p><code>typeof baseCPUCyclesPerIteration</code> reveals <code>"number"</code></p>
  
  <p>The results make it pretty obvious it's a double datatype. I don't understand why bitwise <code>OR 0</code> works on a double in Javascript but doesn't work on Java double's.</p>
  
  <p>Seems the purpose of the <code>| 0</code> is just to trim of the decimal points in double datatype. I'm guessing in Java the equivalent will be <code>(int)</code> or <code>(long)</code> cast is this correct? or the bitwise <code>| 0</code> does more then just trim of the decimal point in javascript?</p>
  
  <p>Edit:
  ya <code>| 0</code> doesn't just trim in javascript just ran this. <code>8899811111.111113453456754645 | 0</code> got back <code>309876519</code>.<br>
  (Although I passed the double limit lol still tries to compute it in javascript, I'm guessing this is where the overflows happen).</p>