# C++ rounding up using which func/library

**URL:** https://forum.kirupa.com/t/c-rounding-up-using-which-func-library/231970
**Category:** programming
**Created:** [July 10, 2007, 4:08am UTC](https://forum.kirupa.com/t/c-rounding-up-using-which-func-library/231970 "2007-07-10T04:08:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![NANO3](https://avatars.discourse-cdn.com/v4/letter/n/c2a13f/32.png) [@NANO3](https://forum.kirupa.com/u/NANO3)
#### Post date: [July 10, 2007, 4:08am UTC](https://forum.kirupa.com/t/c-rounding-up-using-which-func-library/231970/1 "2007-07-10T04:08:27Z")

</div>

Which library and class function would I use to round up to the nearest 0.5

ex. 4.34 --\> 4.5  
5.77 --\> 6.0

Came across the ceil() function in cmath, wondering if this would work?
