🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #1103

Re: reassociation and undefined behaviour

#1103
From: Michael S
Date: Sat, 05 Dec 2026 17:25
24 lines
2749 bytes
On Fri, 4 Dec 2026 17:11:58 -0000 (UTC)
Thomas Koenig <tkoenig@netcologne.de> wrote:

> EricP <ThatWouldBeTelling@thevillage.com> schrieb:
> > 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?  
> 
> If you add enough apples to a pile, the number of apples becomes
> negative (to quote Dan Brown ;-)
> 

A classic examle of signed wrapping producing correct and desirable
result:
https://en.wikipedia.org/wiki/Cascaded_integrator%E2%80%93comb_filter
Technical Details
Message-ID: <20261205192501.00001160@yahoo.com>
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
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> <TlCQS.44884$7vt4.19168@fx07.iad> <11eus8u$1q9ee$1@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Michael S <already5chosen@yahoo.com>
Newsgroups: comp.arch
Subject: Re: reassociation and undefined behaviour
Date: Sat, 5 Dec 2026 19:25:01 +0200
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <20261205192501.00001160@yahoo.com>
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>
	<TlCQS.44884$7vt4.19168@fx07.iad>
	<11eus8u$1q9ee$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 05 Dec 2026 17:25:00 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="3186689"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/DYl7KnDcK1Pq1/UeZTtaGSq6oZrURcJw="; posting-host="eec2e459ea6ea91de1920b0f3b02bbc3"
Cancel-Lock: sha1:GCBI78mZka3NcIi4s8I4qTzgU6c= sha256:NMb/bK77sa3a5p8XAUnQZETzifmshurM1rQ7jfT5d3E=
	sha1:+bWPRcru0kUDxNLYmLKGZjwHHCM= sha256:KyM40dKUO9CZA+Xg8WA8KEb9tpOAn/c4DO0dMlYg2O0=
X-Newsreader: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-w64-mingw32)