QB64 Phoenix Edition
Any math experts know what I'm missing here? [Solved] - Printable Version

+- QB64 Phoenix Edition (https://staging.qb64phoenix.com)
+-- Forum: QB64 Rising (https://staging.qb64phoenix.com/forumdisplay.php?fid=1)
+--- Forum: Code and Stuff (https://staging.qb64phoenix.com/forumdisplay.php?fid=3)
+---- Forum: Help Me! (https://staging.qb64phoenix.com/forumdisplay.php?fid=10)
+---- Thread: Any math experts know what I'm missing here? [Solved] (/showthread.php?tid=911)

Pages: 1 2 3


RE: Any math experts know what I'm missing here? [Solved] - bplus - 09-26-2022

(09-26-2022, 05:57 PM)Pete Wrote: I do have the decimal places worked out for square roots. I need to either modify it for nth roots, or see if I need to tweak it for square roots, in case I missed something. One I settle on a working method, I'll probably scrap the square root one and just use the nth root routine.

Looking forward to getting this up as a "Work in Progress" soon. Right now, it has been fun learning, and putting together systems. While approximation methods are fun, they are just not practical, and too slow for very large numbers. Long division is accurate. Long division with a way to approximate the next part of the quotient is also fast. I'm not quite sure how to do that estimate with nth roots, yet. I have already incorporated a great estimate method in the standard long division process. I hope to apply something similar to nth roots, soon. 100 digits of a two-digit number cube root takes under 1-second, but it takes a 2-3 minutes to take that same two-digit number out to 1,000. places

Anyway, here is a link to my latest nth root in string math, as well as a little routine to calculate the values in Pascal's Triangle.

https://staging.qb64phoenix.com/showthread.php?tid=918

Will you be posting your modified extended square root code? Fun stuff!

Pete

Yeah it's posted along with Dec2Bin$ and Bin2Dec$ and I tried to go from Square Roots to any Real Power but too slow and buggy apparently need infinitely long strings of ...sqr(sqr(2)))))) for accuracy. It's just posted in WIP board.


RE: Any math experts know what I'm missing here? [Solved] - Pete - 09-26-2022

Yep, I was just there!

Pete


RE: Any math experts know what I'm missing here? [Solved] - Kernelpanic - 09-26-2022

Quote:Like cube root of 19 to 100 places?

2.668401648721944867339627371970830335095878569183101865664213586945793971672059716316681593100516540

or how about 1,000?


I've never dealt with string mathematics, also not even in Basic. But today I managed to separate the decimal part from a number like 14.9978667 (actually 15.0) to reduce and it to the relevant three decimal places. Now I just have to scan them. That will be fine!  Wink

A question Pete, what do you do with the 1000 decimal places?  Hopefully nothing naughty.  Dodgy

For those interested in Visual Basic (QB64 is already there):

[Image: VB-Nte-Wurzel-Code.jpg]


RE: Any math experts know what I'm missing here? [Solved] - Pete - 09-26-2022

I work with the first 16 decimal places... and vacation in the other 984.

Pete Big Grin


RE: Any math experts know what I'm missing here? [Solved] - Kernelpanic - 09-26-2022

(09-26-2022, 06:36 PM)Pete Wrote: I work with the first 16 decimal places... and vacation in the other 984.

Pete Big Grin

My sincere condolences!  Tongue