🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #4615

Re: int's and zero

#4615
From: Jerry Coffin
Date: Thu, 11 Jan 1996 23:10
22 lines
1226 bytes
clive@stdc.demon.co.uk (Clive D.W. Feather) wrote:

>In article <4d12qv$fir@natasha.rmii.com>,
>Jerry Coffin <jcoffin@rmii.com> wrote:
>> Yes -- in one's complement, `-0' is represented with all bits set to 1.
>> With one's complement, the usual method of testing for 0 is something
>> like: `if (x+0 == 0)' since the addition of 0 normally produces a
>> positive 0.

>The C Standard requires +0 and -0 to compare equal to each other.

Sorry.  I should have been more explicit - the "something like" was
meant to imply that this had to happen internally, not that it would be
included in the source code.
    Later,
    Jerry.

/* I can barely express my own opinions; I certainly can't
 * express anybody else's.
 *
 * The universe is a figment of its own imagination.
 */
Technical Details
Message-ID: <4d41dk$o84@natasha.rmii.com>
Path: arc1-ca.pugleaf.net!news.rmii.com!usenet
References: <4cth4e$4q@odin.funcom.no> <4cub1a$jbl@alterdial.UU.NET> <4d12qv$fir@natasha.rmii.com> <DKzpI8.8Kx@stdc.demon.co.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.rmii.com!usenet
From: jcoffin@rmii.com (Jerry Coffin)
Newsgroups: comp.std.c
Subject: Re: int's and zero
Date: Thu, 11 Jan 1996 23:10:15 GMT
Organization: TAEUS
Message-ID: <4d41dk$o84@natasha.rmii.com>
References: <4cth4e$4q@odin.funcom.no> <4cub1a$jbl@alterdial.UU.NET> <4d12qv$fir@natasha.rmii.com> <DKzpI8.8Kx@stdc.demon.co.uk>
NNTP-Posting-Host: slip8150.rmii.com
X-Newsreader: Forte Free Agent 1.0.82