title: PHP round to precision 2
body: <p>My payment system takes 0.5% from each transaction.
  I have 0.9$ on my account, very small amount.
  And when I try to withdraw 0.9$ through API it gives an error, it takes 0.0045$ as fee and rounds to 0.91$.
  So I can only withdraw 0.89$ and pay 0.00445$ fee, which is rounded to 1 cent to empty my account;</p>
  
  <p>I can't understand by which formula the additional fee is rounded =(</p>
  
  <pre><code>php round(0.9+0.9*0.005,2) 
  </code></pre>
  
  <p>returns 0.9$, how to get 0.91$?</p>
  
  <p>Edit: ceil works good for this particular amount, but on practice when I withdraw only 1 cent the comission, which is 0.00005 somehow does not count as 0.01, looks like besides ceil() only first two zeros after point are included. hm..  </p>
  
  <p>ceil((0.01*0.005) * 100) / 100; gives 1 cent, but in reality api takes zero.</p>