QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: MWheatley on November 01, 2019, 02:15:07 pm

Title: Anyone got an nth root algorithm?
Post by: MWheatley on November 01, 2019, 02:15:07 pm
I'd rather not reinvent the wheel, so if anyone cares to share one, I'd be grateful.

Malcolm
Title: Re: Anyone got an nth root algorithm?
Post by: bplus on November 01, 2019, 02:24:45 pm
I'd rather not reinvent the wheel, so if anyone cares to share one, I'd be grateful.

Malcolm

r th root of n = n^(1/r) eg square root of 2 = 2 ^ (1/2) or 2 ^ .5
Title: Re: Anyone got an nth root algorithm?
Post by: Qwerkey on November 02, 2019, 05:18:52 am
Er, yes: somewhat obvious.  So were you actually asking for something else, Malcolm?  An algorithm sounds rather grand.
Title: Re: Anyone got an nth root algorithm?
Post by: MWheatley on November 02, 2019, 11:48:55 am
Alas, no, Qwerkey: it was a moment of mathematical blindness, I'm afraid.  Things ill-remembered from 50 years ago, etc.  And probably badly learned, then -- slide rules for university exams were still the norm in my day, at least in my undergraduate years.

So thank you, bplus.  Much appreciated.

Malcolm
Title: Re: Anyone got an nth root algorithm?
Post by: bplus on November 02, 2019, 12:16:40 pm
Alas, no, Qwerkey: it was a moment of mathematical blindness, I'm afraid.  Things ill-remembered from 50 years ago, etc.  And probably badly learned, then -- slide rules for university exams were still the norm in my day, at least in my undergraduate years.

So thank you, bplus.  Much appreciated.

Malcolm

If it weren't for Basic coding, all my math lessons would be long gone.

Qwerkey, if you were hoping for an algorithm and don't remember my algorithm for power calculations (alas QB64 has it covered) I would be glad to share my discovery again :)
Title: Re: Anyone got an nth root algorithm?
Post by: MWheatley on November 03, 2019, 10:36:33 am
Bplus,

I don't know the algorithms to which you refer, but please feel free to share them anyway.  I'm interested!  And I still code in QB45 as well as QB64.

MDW1954
Title: Re: Anyone got an nth root algorithm?
Post by: bplus on November 03, 2019, 11:10:31 am
Bplus,

I don't know the algorithms to which you refer, but please feel free to share them anyway.  I'm interested!  And I still code in QB45 as well as QB64.

MDW1954

Hi MWheatley,

If you missed the conversation, it was here:
https://www.qb64.org/forum/index.php?topic=364.msg2439#msg2439
Title: Re: Anyone got an nth root algorithm?
Post by: MWheatley on November 04, 2019, 05:54:33 am
Thanks!

Malcolm