X-Received: by 2002:a05:620a:1356:b0:6fc:89a8:de45 with SMTP id c22-20020a05620a135600b006fc89a8de45mr4113283qkl.213.1669726250388; Tue, 29 Nov 2022 04:50:50 -0800 (PST) X-Received: by 2002:ad4:424f:0:b0:4c6:d089:64b4 with SMTP id l15-20020ad4424f000000b004c6d08964b4mr27456846qvq.13.1669726250203; Tue, 29 Nov 2022 04:50:50 -0800 (PST) Path: csiph.com!1.us.feeder.erje.net!feeder.erje.net!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.programming Date: Tue, 29 Nov 2022 04:50:49 -0800 (PST) In-Reply-To: <86h6yi6j0p.fsf@linuxsc.com> Injection-Info: google-groups.googlegroups.com; posting-host=93.41.96.190; posting-account=F3H0JAgAAADcYVukktnHx7hFG5stjWse NNTP-Posting-Host: 93.41.96.190 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> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: A little puzzle. From: Julio Di Egidio Injection-Date: Tue, 29 Nov 2022 12:50:50 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 3600 Xref: csiph.com comp.programming:15991 On Tuesday, 29 November 2022 at 13:29:48 UTC+1, Tim Rentsch wrote: > Julio Di Egidio writes: > > On Monday, 28 November 2022 at 16:22:38 UTC+1, Tim Rentsch wrote: > >> Julio Di Egidio writes: > >>>>> 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. > >>> > >>> Argh! But you should not have snipped that "beware > >>> of bugs", that was the most important part!! ;) > >> > >> It's your job to beware of bugs, not mine. > > > > I didn't know you were paying me for production level code: > > You are under no obligation to post bug-free code. Similarly I > am under no obligation to correct bugs in your code. That is not what I said: indeed "beware of bugs" is a paraphrase of Knuth for your info, and what that means. Morover, modulo my mistakes, which is another story, my code *is* bug free, just apparently you are confused about the whole what is what. > But if you > want your postings to be taken seriously it's important to put I am certainly not interested in any such cheap abusive "psychology". > The question can be answered without using any of subtraction, > remainder, or mod, No, it cannot. But feel free to prove me wrong. > 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, let alone write few lines of code that are not imply a horrible mess when at all correct. How long have you being doing this job? You come up as yet another clueless arrogant ass. Julio