08-26-2022, 04:46 PM
(08-26-2022, 04:24 PM)Jack Wrote: Pete
if I set digits% to 100 then your program calculates Pi to about 154 decimals, in your previous version it would only give 51 correct decimals
I think that your precision tracking needs work
In the previous, somewhat different, version, I limited the output to the screen to 51 decimals. So that's about demo presentation, not precision.
I'm now looking into how particular statements slow down calculation loops. I found that setting a variable to the length of a small string, for some weird reason, makes a big noticeable difference in loop speed. Weird. I don't have enough testing yet to conclude why, or what could be used to speed things up. What I do know but don't want to get into now is considering what it would take to do fixed string replacement instead of string concatenation. That definitely increases speed, but it would need to be bullet-proof, meaning it must work in all possible conditions.
Pete