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

From: Jakob Kramer <>
Date: Sat, 21 Jun 2014 16:56:14 +0200

Am 21.06.2014 16:05, schrieb Eric Pruitt:
> On Sat, Jun 21, 2014 at 09:58:16AM +0200, Roberto E. Vargas Caballero wrote:
>> I do not understand why CEIL should return an integer value. From my
>> point of view it should return a value of any type that is the ceil
>> of the parameter. Can you explain a bit better why you think result
>> must be integer?
> I'm only casting it to an integer to ensure the number returned is a
> whole number without any digits beyond the decimal point. Without that,
> the macro would return 4.5 when executed on CEIL(3.5) instead of 4.
What's the problem with ceil(3)? It is C89.
Received on Sat Jun 21 2014 - 16:56:14 CEST

This archive was generated by hypermail 2.3.0 : Sat Jun 21 2014 - 19:00:10 CEST