Top "Ceil" questions

A function common to many programming languages that returns the next integer value by rounding the value up if necessary.

How can I make sure a float will always be rounded up with PHP?

I want to make sure a float in PHP is rounded up if any decimal is present, without worrying about …

php floating-point rounding precision ceil
Ceil function: how can we implement it ourselves?

I know that C++ provides us with a ceil function. For practice, I was wondering how can we implement the …

c++ ceil
Round minutes to ceiling using Java 8

So I'm lucky enough to use Java 8 and the new time APi but I don't see any rounding functions... Basically …

datetime java-8 rounding java-time ceil
Implementation of ceil function in C

I have two questions regarding ceil() function.. The ceil() function is implemented in C. If I use ceil(3/2), it works …

c ceil
How to round up a number if it's not an integer?

I want to calculate a simple number, and if the number is not an integer I want to round it …

scala double ceil
golang - ceil function like php?

I want to return the least integer value greater than or equal to integer division. So I used math.ceil, …

go ceil
Ceiling of a number in JSTL/EL

In JSTL, <fmt:formatNumber value="${1.6}" type="number" pattern="#"/> returns 2 and the following <fmt:formatNumber value="${1.4}" type="number" …

jsp jstl el ceil
Why does Math.ceil return a double?

When I call Math.ceil(5.2) the return is the double 6.0. My natural inclination was to think that Math.ceil(double …

java double long-integer ceil
javascript - ceiling of a dollar amount

So I am adding and subtracting floats in javascript, and I need to know how to always take the ceiling …

javascript math floating-point ceil
Ceil a datetime to next quarter of an hour

Let's imagine this datetime >>> import datetime >>> dt = datetime.datetime(2012, 10, 25, 17, 32, 16) I'd like to ceil it …

python datetime ceil