Article View: comp.arch
Article #1071Re: reassociation and undefined behaviour
From: EricP
Date: Fri, 04 Dec 2026 17:01
Date: Fri, 04 Dec 2026 17:01
10 lines
1969 bytes
1969 bytes
On 2026-Dec-04 03:35, David Brown wrote: > On 03/12/2026 20:43, MitchAlsup wrote: > > So it is useful in the same way that two's complement wrapping for signed arithmetic is useful - it is absolutely absurd mathematically that you can add two positive numbers and get a negative one, there is almost certainly a bug in your program if this happens in general code, but it matches the hardware, is often harmless, and it is occasionally handy. Why is signed twos's complement wrapping mathematically absurd? I'm not a mathy but is it mathematically not just modulo arithmetic with a relabelling of some values?
Technical Details
Message-ID:
<TlCQS.44884$7vt4.19168@fx07.iad>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer05.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx07.iad.POSTED!not-for-mailReferences:
<11cpqih$acf5$1@dont-email.me> <86o6b6kaqf.fsf@linuxsc.com> <11ejr5e$nk8$1@reader2.panix.com> <11ejtoe$eoj7$1@dont-email.me> <11el2c1$q43$1@reader2.panix.com> <11emcgn$1k681$1@dont-email.me> <jwvbj74bzm4.fsf-monnier+comp.arch@gnu.org> <11eolqn$2peg5$1@dont-email.me> <2026Dec2.132411@mips.complang.tuwien.ac.at> <11epd07$362ph$1@dont-email.me> <1796263648-5857@newsgrouper.org> <11ergn7$6utu$1@dont-email.me> <2026Dec3.122036@mips.complang.tuwien.ac.at> <1796326998-5857@newsgrouper.org> <11etu0b$1aih9$1@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer05.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx07.iad.POSTED!not-for-mail MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: reassociation and undefined behaviour Content-Language: en-CA Newsgroups: comp.arch References: <11cpqih$acf5$1@dont-email.me> <86o6b6kaqf.fsf@linuxsc.com> <11ejr5e$nk8$1@reader2.panix.com> <11ejtoe$eoj7$1@dont-email.me> <11el2c1$q43$1@reader2.panix.com> <11emcgn$1k681$1@dont-email.me> <jwvbj74bzm4.fsf-monnier+comp.arch@gnu.org> <11eolqn$2peg5$1@dont-email.me> <2026Dec2.132411@mips.complang.tuwien.ac.at> <11epd07$362ph$1@dont-email.me> <1796263648-5857@newsgrouper.org> <11ergn7$6utu$1@dont-email.me> <2026Dec3.122036@mips.complang.tuwien.ac.at> <1796326998-5857@newsgrouper.org> <11etu0b$1aih9$1@dont-email.me> From: EricP <ThatWouldBeTelling@thevillage.com> In-Reply-To: <11etu0b$1aih9$1@dont-email.me> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Lines: 10 Message-ID: <TlCQS.44884$7vt4.19168@fx07.iad> X-Complaints-To: abuse@UsenetServer.com NNTP-Posting-Date: Fri, 04 Dec 2026 17:01:39 UTC Date: Fri, 4 Dec 2026 12:01:36 -0500 X-Received-Bytes: 1748