I want to make sure a float in PHP is rounded up if any decimal is present, without worrying about mathematical rounding rules. This function would work as follows:
I know this question has long since been answered, but it came up when I did a google search on the topic. If you want to round up with precision, then a good method would be to use the ceil function and times the number by how many decimal points you want to represent and then divide by that number.
ceil(1024.321*100)/100
would produce 1024.33