title: Dividing variables of type long long to get a percentage?
body: <p>So I am trying to divide two variables that are type <code>long long</code>, <code>totalBytesWritten</code> and <code>totalBytesExpected</code></p>
  
  <p>Basically I am trying to figure out the percentage complete my file upload is and update the progressbar accordingly.
  For example, I am sending 262144 of 1839948 bytes</p>
  
  <p>But when I do <code>double progress = totalBytesWritten/totalBytesExpected</code> it gives me some unexpected numbers. When I NSLog progress I get only 0s and then finally 1.</p>
  
  <p>Thanks!</p>