08-26-2022, 09:36 PM
(08-26-2022, 08:48 PM)Jack Wrote: Pete
why do you increase the precision on every loop count ?
I assume that's what limit&& does ?
For faster computations. Let's say we want to use 150-digits. I could just set limit&& = 150 at the start, but when we do the initial loops, where only a few digits are returned, the numbers that are generated to make those smaller amounts are much larger in scale than they need to be to produce the same results, but when we approach a 150 digit readout, all the computations that make it up need to be worked out to 150 digit precision or greater in order for the results to be valid. This is where Treebeard's string functions miss when at 26 and 38 digits, the SQR(8) or 8 is not worked out far enough. Oh, for mine, I just put in a cheat with the SQR(8) for now, which defines the value just once, at 200-digits. A bit more than is needed for all the equations.
From what I've tested so far, it's the non-updated division routine that is where I would have to go to achieve better speed. I'm just not up to tackling that, at the present.
Another consideration would be to tweak the limit&& variable so it could be interchangeable with the digit%variable. As it stands now, the limit&& variable needs to be a bit bigger than the digit% variable to produce the correct results.
Pete