Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Newton had a fun way to approximate general roots...
#4
(09-13-2022, 03:58 AM)bplus Wrote: LOOP UNTIL olda = a

Because it hard to get olda to be exactly = a

Loop Until abs(a-olda) < someTinyNumber  ' Might work better

Good point. Many of these iteration functions eventually repeat. It might be an interesting challenge to find a number and root combination that does not. In any case, I would imagine when I convert this to string math, I can exit it by limiting the progressively longer output of digits. That would be preferable to trying to figure out what that "tiny number" would be with so many different decimal possibilities to consider. That's another algorithm to itself. The goal, of course, is to prevent an infinite loop situation. I could always use LOOP UNTIL STEVE = funny_looking, but that would cause a premature exit situation, in most cases. Big Grin

Pete
Reply


Messages In This Thread
RE: Newton had a fun way to approximate square roots... - by Pete - 09-13-2022, 04:18 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  "I'm Having Fun." James D Jarvis 6 1,309 07-25-2023, 11:32 PM
Last Post: Kernelpanic
  New General Discussion Subforums admin 13 4,724 02-14-2023, 08:21 AM
Last Post: PhilOfPerth
  Fun with hardware acceleration. Pete 0 478 10-20-2022, 10:25 PM
Last Post: Pete
  Roots and powers playing nicely together... Pete 28 5,110 10-01-2022, 10:16 PM
Last Post: Kernelpanic
  Pascal's Triangle and nth roots. Pete 2 883 09-26-2022, 04:15 PM
Last Post: Pete

Forum Jump:


Users browsing this thread: 2 Guest(s)