Re: [dev] [st] [PATCH] Explicit cast in CEIL macro

From: Jakob Kramer <jakob.kramer_AT_gmx.de>
Date: Tue, 24 Jun 2014 17:34:47 +0200

Am 24.06.2014 16:46, schrieb Eric Pruitt:
> On Tue, Jun 24, 2014 at 03:33:10PM +0200, FRIGN wrote:
>> However, I favor Martti's verson, which is just plain genius:
>>
>> CEIL(x) ((int)(x) + ((x) > 0))
>
> Perhaps I'm missing something here, but this completely fails whenever
> (x) is already a whole number


On 2014-06-24 Jakob Kramer wrote:
> Finally, I don't think that reimplementing a function that already is
> in the standard library for "more efficiency" makes any sense.
> Correctness is most important, and I rather trust my C library
> implementation on that.
Received on Tue Jun 24 2014 - 17:34:47 CEST

This archive was generated by hypermail 2.3.0 : Tue Jun 24 2014 - 17:36:22 CEST