DSPRelated.com
Forums

Pi approximation games

Started by Tim Wescott May 1, 2012
On 2012-05-02, John Devereux <john@devereux.me.uk> wrote:
>> I recall the time when you couldn't consider 25.4 mm to be exactly >> one inch. But, they fudged enough standards so that it is now exact. > > Aha, good idea, we should standardize pi to a more convenient value! :)
We just have to slightly increase the value of 1, so pi will equal 3. :-) -jm
On Thu, 03 May 2012 12:53:39 +0200, David Brown wrote:

>> The algorithm that can supply the Nth digits of pi lazily *only* works >> for hexadecimal digits (or base 2^N for certain N). >>
An YES answer to a question that I have had rattling around for a while, to wit - Are there properties (aside from trivial ones) of base-n numbers not shared by base-a-different-n numbers. *Why* can you skip ahead to a hex digit of pi but not a dec digit? Is this unique to pi and base 2^x, or is it true for certain irrational numbers, or all? If only some, are there similar (lack of) algorithms for other combinations of base and irrational number(s)?
On 03/05/2012 13:50, xpzzzz wrote:
> On Thu, 03 May 2012 12:53:39 +0200, David Brown wrote: > >>> The algorithm that can supply the Nth digits of pi lazily *only* works >>> for hexadecimal digits (or base 2^N for certain N). >>> > > An YES answer to a question that I have had rattling around for a while, > to wit - > > Are there properties (aside from trivial ones) of base-n numbers not > shared by base-a-different-n numbers. > > *Why* can you skip ahead to a hex digit of pi but not a dec digit? > > Is this unique to pi and base 2^x, or is it true for certain irrational > numbers, or all? If only some, are there similar (lack of) algorithms > for other combinations of base and irrational number(s)?
Proving properties of numbers, such as whether they are rational, irrational, transcendental, normal, etc., is generally very difficult. And many of their properties probably have no better explanation than coincidence. Pi is known to be "normal", meaning that if you write out its "decimal expansion" in any base, the digits will be evenly distributed amongst all possible digits.
On 03/05/2012 12:50, xpzzzz wrote:
> On Thu, 03 May 2012 12:53:39 +0200, David Brown wrote: > >>> The algorithm that can supply the Nth digits of pi lazily *only* works >>> for hexadecimal digits (or base 2^N for certain N). >>> > > An YES answer to a question that I have had rattling around for a while, > to wit - > > Are there properties (aside from trivial ones) of base-n numbers not > shared by base-a-different-n numbers. > > *Why* can you skip ahead to a hex digit of pi but not a dec digit?
Because an infinite series expansion for PI is known where all the components being summed together are of the form sum ( 1/16^k.f(k) ) It is therefore possible to start from a chosen digit position and compute just the digits of interest from there on. The URL I posted describes a bit more of the details of the algorithm.
> Is this unique to pi and base 2^x, or is it true for certain irrational > numbers, or all? If only some, are there similar (lack of) algorithms > for other combinations of base and irrational number(s)?
It is entirely possible that some other irrationals may have an elegant series expression in some base or other, but off hand I don't know of any other commonly known examples of this. A quick back of the envelope playing around suggests that the golden ratio phi may well have an expansion base 8 that is amenable to the same sort of trick. phi = (1 + sqrt(5))/2 = 1/2 + sqrt(1 + 1/4) series expansion for sqrt(1+x) with x = 1/4 1/2 + 1 + x/2 - x^2/2!/4 + 3x^3/3!/8 - ... 1 + 1/2 + 1/8 - sum[k=2,inf]{ 1/(-4^k) ((2k-3)!/((k-2)!k!) } as ever subject to mistakes, typos and algebra errors. -- Regards, Martin Brown
In article <65c01ed5-a89a-4a80-b9f3-60967af49a00
@s9g2000pbq.googlegroups.com>, gyansorova@gmail.com says...
> > > That's the British customary units, not English, that's the language > you are confusing with the country which is Great Britain. another > common mishtake made by americans.
You surely mean inhabitants of the United States of America. Mexicans, Argentinians and Cubans, though Americans themselves, don't confuse English and British. Another common mistake made by yankees :-)
On Wed, 2 May 2012 23:38:26 -0700 (PDT), Robert Adams
<robert.adams@analog.com> wrote:

> >I've recently discovered a program called Wolfram Alpha. If you have >an obsessive interest in series expansions, you can spend hours with >this program. > >Bob
Interesting! Taylor Maclaurin expansions are great for getting insight into nonlinear stuff. http://www.wolframalpha.com/entities/calculators/taylor_series_calculator/ew/pd/4g/ Of course MATLAB and such like will do this, but they don't work for free.
On 03.05.2012 16:09, Spehro Pefhany wrote:
> On Wed, 2 May 2012 23:38:26 -0700 (PDT), Robert Adams > <robert.adams@analog.com> wrote: > >> >> I've recently discovered a program called Wolfram Alpha. If you have >> an obsessive interest in series expansions, you can spend hours with >> this program. >> >> Bob > > Interesting! > > Taylor Maclaurin expansions are great for getting insight into > nonlinear stuff. > > http://www.wolframalpha.com/entities/calculators/taylor_series_calculator/ew/pd/4g/ > > Of course MATLAB and such like will do this, but they don't work for > free. >
Scilab is free...
Ignacio G.T. wrote:
> In article<65c01ed5-a89a-4a80-b9f3-60967af49a00 > @s9g2000pbq.googlegroups.com>, gyansorova@gmail.com says... >> >> >> That's the British customary units, not English, that's the language >> you are confusing with the country which is Great Britain. another >> common mishtake made by americans. > > You surely mean inhabitants of the United States of America. Mexicans, > Argentinians and Cubans, though Americans themselves, don't confuse > English and British. Another common mistake made by yankees :-) >
I've some Canadian relatives who were very vocal on their right to be called American.
On 2012-05-03 13:32, Jukka Marin wrote:
> On 2012-05-02, John Devereux<john@devereux.me.uk> wrote: >>> I recall the time when you couldn't consider 25.4 mm to be exactly >>> one inch. But, they fudged enough standards so that it is now exact. >> >> Aha, good idea, we should standardize pi to a more convenient value! :) > > We just have to slightly increase the value of 1, so pi will equal 3. :-) > > -jm
Yeah, but you'd have an irrational number of fingers. Jeroen Belleman
On Wed, 02 May 2012 15:29:19 -0500, David Drumm wrote:

> I wonder if there's a theorem that states: given a small positive number > epsilon, there exists a rational number that is within epsilon to pi.
There is -- or at least there's a theorem that states that there exists a rational number that's within epsilon of _any_ irrational number, be it pi, e, or the precise length, in inches, of your left foot. In fact, in some mathematical circles that theorem is used to provide proof that the irrational numbers are, indeed, real -- and therefore to prove that the real numbers (which is the union of the sets of all rational numbers and all irrational numbers) is, indeed, real and continuous. -- My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com