Post Reply 
mini challenge: find the smallest cosine of an integer
10-23-2021, 06:47 AM
Post: #10
RE: mini challenge: find the smallest cosine of an integer
Thinking a little more about Peter's program, if we separately accumulate the 3 and the pi-3, and if we carry a 0.5 from the accumulation of fractions whenever it exceeds 0.5, into the accumulation of integers (now an accumulation of half-integers), we'll find that we lose very little accuracy as proceed, which might extend the useful range of the search.

Indeed, I think we can do a little better, by also accumulating the even smaller fraction which holds the difference between the limited precision value of pi we're using and the real value of pi. We need to add this accumulation of tiny pieces to the accumulation of fractions when comparing to see how close we are to an integer. I don't think we'll need to split this tiny accumulation into big and small parts.

Before I decided to trim the fractional accumulation by 0.5, I was going to trim it whenever it exceeded 1.0. With this approach, whenever we go over 1.0, we can as a next step accumulate 6 times our fraction, because we know the fraction is less than 1/7. So that could be a speedup. If that works, it could I think be modified for the more accurate approach of trimming at 0.5.

The more mathematically inclined reader might be interested in this related paper I found:
Rosenholtz, I. (1999). Tangent Sequences, World Records, π, and the Meaning of Life: Some Applications of Number Theory to Calculus. Mathematics Magazine, 72(5), 367. doi:10.2307/2690793
Quote:the author knows of no other instance in which knowing several million digits of pi is actually useful
Quote:To summarize: If we desire to find |tan(n)|/n records, we need only look at numerators of those convergents of the continued fraction expansion of pi/2 having odd denominators
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: mini challenge: find the smallest cosine of an integer - EdS2 - 10-23-2021 06:47 AM



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