title: Previous even number
body: <p>If an integer is uneven (odd), I would like to get the previous number, otherwise I would like to keep the current number. E.g. if <code>x = 3</code>, I would like to assign <code>2</code> to <code>x</code>, if <code>x = 4</code>, then nothing happens.</p>
  
  <p>At the moment, I do the following: <code>x = (x/2)*2</code>, but I have heard that division is computational expensive. Does <code>-O3</code> optimize this expression? I am using the <code>c++ (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4</code> compiler. <code>x</code> is a <code>uint32_t</code>.</p>