On Mon, Apr 19, 2010 at 08:15:33PM +0200, [email protected] wrote:
>
> Thanks for the note. But I think I have found the problem: a division by
> 2 supposed to be "floor" and that slips as (x + y) / 2: is there
> anything that guarantees that the result shall be floor, ceil or
> nearest? I find nothing in C89.
Replying to myself: K&R, C, A7.6 Multiplicative operators.
=> The problem is with negatives for which there is only a general rule.
--
Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89 250D 52B1 AE95 6006 F40C