Subject: Re: Documentation of abs(3), div(3) etc.
To: None <tech-misc@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: tech-misc
Date: 02/09/2007 23:07:32
On Fri, 09 Feb 2007, Martijn van Buul wrote:
> >> > This is a lie anyway because the code looks like
> >> >
> >> > 	return a < 0 ? -a : a;
> >> >
> >> > whereas it obviously means
> >> >
> >> > 	return a < 0 ? -(unsigned)a : a;
> >> This is plain nonsense, on multiple grounds. [...]
> > The suggested replacement code is correct. 
>
> It is not. It is nonsensical, in that it is in effect the same as the
> supposedly "broken" code.

Yes, the effect is the same as the supposedly broken code, so it's
pointless.  I thought you were saying that it would yield incorrect
results, and that's what I was disagreeing with.

--apb (Alan Barrett)