From: hiro <23hiro@gmail.com>
To: 9front@9front.org
Subject: Re: [9front] Re: seq: fix infinite loop
Date: Tue, 17 Aug 2021 04:15:36 +0200 [thread overview]
Message-ID: <CAFSF3XPtpD+L2PeHnhRBxnD0mG6zeiDGUtvej9pib1qqhMPxAw@mail.gmail.com> (raw)
In-Reply-To: <A13DF33ECEED94E0DEE98A46E9586F13@eigenstate.org>
sounds like a good addition to the BUGS section of the man page
On 8/17/21, ori@eigenstate.org <ori@eigenstate.org> wrote:
> Quoth Anthony Martin <ality@pbrane.org>:
>> But really, if you're playing games at the boundaries
>> of floating point precision, you're bound to lose. I
>> suggest we either a) do nothing and leave the loop
>> exactly as it is described in the manual but add a note
>> in the BUGS section, or b) go back to the v8 method
>> that calculates the number of steps in the loop before
>> executing it. Even with the latter method you can see
>> odd results due to precision limitations but at least
>> there will be no infinite loops.
>>
>> I vote for "a".
>>
>
> I agree -- *BUT* I like the consolidation of the
> two loops. I'd take that.
>
> I also wonder if:
>
> for(val = min; val <= max; val += incr){
> if(val == prev)
> sysfatal("insufficient precision")
> ...
> prev = val
> }
>
> covers the infinite loop case sufficiently.
>
>
next prev parent reply other threads:[~2021-08-18 10:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-15 22:02 [9front] " Sean Hinchee
2021-08-16 21:45 ` Amavect
2021-08-18 22:53 ` Eckard Brauer
2021-08-16 22:24 ` [9front] " Anthony Martin
2021-08-16 23:38 ` ori
2021-08-17 2:15 ` hiro [this message]
2021-08-21 1:30 ` Amavect
2021-08-18 2:49 ` [9front] " ori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFSF3XPtpD+L2PeHnhRBxnD0mG6zeiDGUtvej9pib1qqhMPxAw@mail.gmail.com \
--to=23hiro@gmail.com \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).