Search the Community
Showing results for tags 'ceil'.
Found 1 result
Please any information or suggestion is welcome. Question: 1. Does boostC have any inbuilt "rounding" function? One that rounds to the nearest integer e.g. like python's "maths.ceil ( ) function" . I want to manipulate a float number say 3.4 to become 3.5. If I were to do this using the ceil ( ) function: ceil (2 * raw_decimal) / 2 where : raw_decimal = 3.4 , the function rounds 6.8 to 7 then dividing by 2 gives 3.5. I basically want to get my numbers to the nearest whole or 0.5 decimal. 2. Is there any work around in boostC if there is no inbuilt compiler function to do this? Thanks Bade