Re: MATH_MOD: Include in GLib?

Sven Neumann <sven gimp org> writes:

> The behaviour for negative operands is by definition undefined. This
> it doesn't make sense to make any assumptions about it. Any macro that
> passes a negative operand to the C modulo operator is broken. No
> matter how well it may seem to work.

Ah, okay.  The way you originally put it, first pointing out that the
modulo operator is undefined for negative operands, and then
continuing with ``Also, your macro won't work because ...'' made me
think that there was something else wrong with it.

Daniel Brockman
drlion deepwood net

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]