title: Odd error using intrinsic typecasting in CUDA
body: <p>I cannot figure out what the difference between the following pieces of code is:</p>
  
  <pre><code>int t = __double2int_rd(pos.x/params.cellSize.x*2.0)&amp;1;
  if( t ==0) {...}
  </code></pre>
  
  <p>and</p>
  
  <pre><code>if(__double2int_rd(pos.x/params.cellSize.x*2.0)&amp;1 == 0) {...}
  </code></pre>
  
  <p>The second option never returns true, while the first behaves as expected.</p>
  
  <p>Does anyone have any ideas?</p>