Re: Documentation of abs(3), div(3) etc.

Alan Barrett <[email protected]>
Newsgroups gmane.os.netbsd.devel.general
Message-ID <[email protected]>
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)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.