Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #401204
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Tim Rentsch <tr.17687@z991.linuxsc.com> |
| Newsgroups | comp.lang.c |
| Subject | Re: Representing signed values in corresponding unsigned types |
| Date | Sat, 15 Aug 2026 02:19:20 -0700 |
| Organization | A noiseless patient Spider |
| Lines | 18 |
| Message-ID | <86fr0f68rr.fsf@linuxsc.com> (permalink) |
| References | <111qs0g$3hdko$1@dont-email.me> <86zf0e7ox4.fsf@linuxsc.com> <111shlo$3vq40$2@kst.eternal-september.org> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Injection-Date | Sat, 15 Aug 2026 09:19:25 +0000 (UTC) |
| Injection-Info | dont-email.me; logging-data="3444149"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+B/aP0k7vcUkfHCYtI7iImtjVekHmST2E="; posting-host="f88cfb7384c39afe54609bf3101f3803" |
| User-Agent | Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) |
| Cancel-Lock | sha1:OGJJdI7nkhjsFqAcPV8Wk5wWl7o= sha1:BRAPVKnPu+xUW/50CdWnS8jVvoE= sha256:X9up1QAwJhK1YYAaHXY95dW6uQk1XeYEj/EBLyCygf0= sha1:a8SWkV+fC+oWoJTSJjW4vWuT+co= sha256:tYk/5iwQhfUPoV7IT3N5ZdpyJMD8yOj/+4AMGMVNfUs= |
| Xref | csiph.com comp.lang.c:401204 |
Show key headers only | View raw
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes: > Tim Rentsch <tr.17687@z991.linuxsc.com> writes: > >> NS <ns@2b.here> writes: >> >>> Can all the values of a signed int be represented in an unsigned >>> int (or signed long in an unsigned long, etc.)? > > Obviously not. Negative values cannot be represented in unsigned > types. But I don't think that's what NS meant. The question is Can all the values of a signed int be represented in an unsigned int? The question is not can an unsigned int hold all the values of a signed int. An apple, an orange, and a banana can represent the integers 1, 2, and 3. All the values of a signed int can be represented in an unsigned int, as long as UINT_MAX is greater than INT_MAX.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Representing signed values in corresponding unsigned types NS <ns@2b.here> - 2026-06-28 10:11 +0000
Re: Representing signed values in corresponding unsigned types ram@zedat.fu-berlin.de (Stefan Ram) - 2026-06-28 12:07 +0000
Re: Representing signed values in corresponding unsigned types Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-06-28 06:52 -0700
Re: Representing signed values in corresponding unsigned types Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-28 18:27 -0700
Re: Representing signed values in corresponding unsigned types cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-29 12:13 +0000
Re: Representing signed values in corresponding unsigned types Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-08-15 02:19 -0700
Re: Representing signed values in corresponding unsigned types Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-08-15 05:48 -0700
Re: Representing signed values in corresponding unsigned types James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-06-28 22:23 -0400
Re: Representing signed values in corresponding unsigned types Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-28 20:24 -0700
csiph-web