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

From: Eric Pruitt <>
Date: Sat, 21 Jun 2014 09:05:45 -0500

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.
Received on Sat Jun 21 2014 - 16:05:45 CEST

This archive was generated by hypermail 2.3.0 : Sat Jun 21 2014 - 16:12:06 CEST