Posted 25 August 2009 - 05:53 PM
first off this is just a hobby exercise. but say you have an infinite series of random numbers i.e. "0.42014928858192.. etcetera".
Here is an example of my first shot at doing such a thing.
were n = 1 and d = 1 , and a = the random number
n/d = c
if c < a then n = n + 1
if c > a then d = d + 1
this approximates the number perfectly, but is very slow.
I output n and d to a file every iteration, then plot them, to which i find a very nice little pattern, that seems to have a very particular angle. I get the angle by averaging n and d which seems to work out pretty well up until the point n and d stop, then the angle goes off course.
Now I remember hearing that 6 or 7 digits of pi was enough to calculate the circumference of the known universe to within the accuracy of an atom (don't quote me on this). so then if i have an angle that is accurate to say 20 decimals then how does the angle go off course so quickly. And is there any way to correct it?
Posted 25 August 2009 - 06:18 PM
I'm not sure what you mean by saying that "the angle goes off course". Clearly the n vs. d curve should converge to a slope n/d equal to the number being approximated. Can you post an image of the graph to help explain?
Actually, no...an atom is about 10^-11 meters across, while the observable universe is about 10^27 meters across. So you'd need something like 38 digits of pi to calculate the circumference that accurately. However, when doing single-precision arithmetic on a computer, only about 6 or 7 decimal digits can be stored; with double-precision, 15 or 16 digits. To work with longer numbers you need a special arbitrary-precision arithmetic library.
Posted 25 August 2009 - 09:08 PM
The dotted line in the picture is the plotting of a and b, were a is the x-axis and b is the y-axis.
I came up with a way to approximate the random number faster then adding 1 to either a or b, by multiplying both a and b by 10 if the product of a/b has a closer approximation then it had before. The plot doesn't multiply by 10 but instead adds 10 to x and y so that they don't go over there bit limit. the same angle is achieved.
The random number I used is: 0.811319243339041120212239080712172745200117254351360228364246460925262842220
and after about five minutes I ended up with:
Which is accurate to 35 decimals: 0.81131924333904112021223908071217274
When trying to use the angle to predict the rest of the random number though it will be accurate up to a and b, and cannot be used to even get a couple extra decimals, which i could then use to make a and b more accurate, recalculate the angle to a higher precision and repeat the steps to have a way to predict the rest of the random sequence. i have a few idea's why the angle cannot achieve even one extra decimal but nothing that is well defined.
Posted 25 August 2009 - 09:19 PM
Posted 25 August 2009 - 09:31 PM
but obviously it would be best if this idea never could work.
Posted 25 August 2009 - 09:41 PM
Put another way, you don't get more information by converting it from rational format to an angle. For instance if you know the first three digits are 0.811, then the slope is between 0.811 and 0.812, and so the angle is between atan(0.811) and atan(0.812). You still have a range of possible angles based on what you know, but no way to predict which angle within that range is the right one.
Posted 26 August 2009 - 12:32 AM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users