On Tue, 24 Jun 2014 09:46:33 -0500
Eric Pruitt <eric.pru...@gmail.com> wrote:

> CEIL(x) ((int)(x) + ((x) > 0))
> 
> Perhaps I'm missing something here, but this completely fails whenever
> (x) is already a whole number; CEIL(3.0) => 4.0 which is not the correct
> behaviour.

Damn, you are right -.-. Back to the drawing board.

CEIL(x) ((int)(x) + ((x) > 0 && (int)(x) != (x)))

I couldn't come up with a better one. Maybe you do.

Cheers

FRIGN

-- 
FRIGN <d...@frign.de>

Reply via email to