Post Reply 
(Spoilers!) Comments and discussion on Valentin's 5th "Then and Now" - Roots
02-16-2023, 08:35 AM (This post was last modified: 02-16-2023 09:49 AM by J-F Garnier.)
Post: #9
RE: (Spoilers!) Comments and discussion on Valentin's 5th "Then and Now" - R...
(02-15-2023 09:31 PM)Fernando del Rey Wrote:  I have taken the code for the R(x) function from Valentín's Small Fry - Primes A'counting article.

You just need to modify line 170 to remove the rounding in the final result:
[...]
Playing with the FNR function, I see that there is a change from positive to negative values somewhere in the range x=4E-11 to x=5E-11. So there is at least a root inside this range.

Hi Fernando,
These 'roots' are just numeric garbage, as I also experimented with my slightly more accurate program using the Horner method to evaluate R(x), I found sign reversals starting with log(x)=32 i.e. x around 1E-14.

This comes from huge digit cancellation when summing the terms, for instance with log(x)=-30 we sum -30/1+900/4-27000/18+810000/96... until the k! takes precedence (°) and makes the terms tend to zero, and everything should sum to something close to 0.
So I believe the solution is with an approximation of R(x), but I'm afraid the idea I got yesterday is not practical.

Actually, we know, since the above post, that the roots are much much smaller, around log10(x)=-15000.
This doesn't spoil anything, because the challenge is to compute them on the 71B !

J-F

Edit:
(°) this happens at k~80: 30^80=1.5e118; 80! = 7e118
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (Spoilers!) Comments and discussion on Valentin's 5th "Then and Now" - R... - J-F Garnier - 02-16-2023 08:35 AM



User(s) browsing this thread: 2 Guest(s)