 <p>It's the order of operation. In <code>p = p * 4/3</code> the compiler is doing:</p> <pre><code>p = (p * 4)/3 </code></pre> <p>However in <code>p *= 4/3</code>, the compiler is doing:</p> <pre><code>p = p * (4/3) </code></pre> <p>4/3 is 1 on the computer because of integer division, so the second example is basically multiplying by 1.</p> <p>Instead of dividing by 3 (an integer), divide by 3.0 (a double) or 3.0f (a float). Then p *= 4/3.0 and p = p * 4/3.0 are the same.</p>