Path: csiph.com!1.us.feeder.erje.net!3.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.programming Subject: Re: A little puzzle. Date: Wed, 30 Nov 2022 02:24:11 -0800 Organization: A noiseless patient Spider Lines: 53 Message-ID: <865yew7nas.fsf@linuxsc.com> References: <875yf8nijb.fsf@bsb.me.uk> <42d09790-8473-4d9a-bc3f-35ed25e84b54n@googlegroups.com> <86y1rv7oeu.fsf@linuxsc.com> <86tu2j6r46.fsf@linuxsc.com> <029e75d5-a825-4266-b593-1c98056076b2n@googlegroups.com> <86h6yi6j0p.fsf@linuxsc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader01.eternal-september.org; posting-host="37f73aa3f81ed14d737b288531919ff7"; logging-data="2653028"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19FfLs1BPqt/htI2t2vwGF82VNMgWUzvF8=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:n6gBGDkZPW0TEd9SbVahl+UQcWE= sha1:cW6xu6AgudBxQ0FBrNBk7nFYtyE= Xref: csiph.com comp.programming:16010 Julio Di Egidio writes: [edited for brevity] > On Tuesday, 29 November 2022 at 13:29:48 UTC+1, Tim Rentsch wrote: >..> On Monday, 21 November 2022 at 21:45:34 UTC+1, Ben Bacarisse wrote: >..>> Consider any ordered measure that "wraps round" -- bearings in >..>> degrees, minutes in the hour, indeed hours in either the 12 or >..>> 24 hour clock. The problem is to determine if a given value is >..>> in the sub-range specified by a start and an en value. >> The question can be answered without using any of subtraction, >> remainder, or mod, > > No, it cannot. But feel free to prove me wrong. At this point I see no reason to try to convince you. >> and more than one solution has been posted >> demonstrating that property. Perhaps you missed those answers. > > The answer by Paul N is equivalent to mine, but I have given a > formalization, plus a courtesy implementation of MOD for those > playing with a language that does not have it built-in. > > And my formalization was not so much to improve on Paul's > answer anyway, it was more out of the irritation of the several > posts by you and others with the deranged morals but not > even able to state an interface, I posted an interface in my initial response to the lead post of the thread. IIANM that response was in fact the first response of any in the thread. Which of my earlier posts irritated you, and what parts of them caused you irritation? > let alone write few lines of > code that are not imply a horrible mess when at all correct. I don't know how to make sense of the restrictive phrase here. > How long have you being doing this job? You come up as yet > another clueless arrogant ass. I first posted in net news (back when it was called usenet) back in the mid 1980s. My first experience with computer programming was in the late 1960s. My first exposure to C was in 1978, reading "The C Programming Language" by Kernighan and Ritchie. At that time C was roughly the tenth programming language I was familiar with.