title: Round a value to nearest number divisible by 2, 4, 8 and 16?
body: <p>How do i round a decimal number to the nearest number divisible by 2, 4, 8 and 16 in python?</p>
  
  <p>Example: </p>
  
  <pre><code>1920/1.33 = 1443.609022556391 
  </code></pre>
  
  <p>It should round off to 1440 as it is easily divisible by the 2, 4, 8 and 16 and vice versa ( 1440*1.33 = 1920 ).</p>
  
  <pre><code>1920/1.33 = 1440
  </code></pre>