title: How to ceil, floor and round bcmath numbers?
body: <p>I need to <strong>mimic the exact functionality of the <a href="http://php.net/manual/en/function.ceil.php" rel="noreferrer">ceil()</a>, <a href="http://www.php.net/manual/en/function.floor.php" rel="noreferrer">floor()</a> and <a href="http://www.php.net/manual/en/function.round.php" rel="noreferrer">round()</a> functions on bcmath numbers</strong>, <a href="https://stackoverflow.com/questions/231057/how-to-round-ceil-floor-a-bcmath-number-in-php">I've already found a very similar question</a> but unfortunately <a href="https://stackoverflow.com/questions/231057/how-to-round-ceil-floor-a-bcmath-number-in-php/231171#231171">the answer provided isn't good enough for me</a> since it <strong>lacks support for negative numbers</strong> and the <strong>precision argument for the round() function is missing</strong>.</p>
  
  <p>I was wondering if anyone can come up with a rather short and elegant solution to this problem.</p>
  
  <p><strong>All input is appreciated, thanks!</strong></p>