Recent

Author Topic: My little stupid pi discoveries  (Read 3743 times)

mika

  • Full Member
  • ***
  • Posts: 137
Re: My little stupid pi discoveries
« Reply #15 on: December 16, 2022, 02:04:43 pm »
I also liked finding Pi in Pi itself, reminds me of babushka puppets... ::)
Your findings are not only quite amusing, but may be even useful some time  :D
It is a subset of very big problem. So, solution in timely meaner is desirable finding.

it can be proven that any approximation of Pi to any number of digits must be contained in Pi itself.
It does look like so, but do you have written down prof or you just throw words in the wind.
« Last Edit: December 16, 2022, 02:06:37 pm by mika »

MarkMLl

  • Hero Member
  • *****
  • Posts: 8572
Re: My little stupid pi discoveries
« Reply #16 on: December 16, 2022, 02:31:15 pm »
it can be proven that any approximation of Pi to any number of digits must be contained in Pi itself.
It does look like so, but do you have written down prof or you just throw words in the wind.

I believe that Cantor would argue that if pi truly does contain an infinite number of digits, then somewhere in pi is the digit sequence representing the true value of pi... not just an approximation.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Petri

  • New Member
  • *
  • Posts: 20
Re: My little stupid pi discoveries
« Reply #17 on: December 16, 2022, 02:39:30 pm »

I believe that Cantor would argue that if pi truly does contain an infinite number of digits, then somewhere in pi is the digit sequence representing the true value of pi... not just an approximation.

MarkMLl
Wow! That is an interesting view! Funny view.

An infinite set is one that contains a subset that is 'as great' (google translated wrong finnish word 'mahtava') as the set itself. So that might make sense?

The fact that there is any finite sequence of numbers in pi is easier to understand: since the decimals of pi are proven to be random, then any finite sequence whose length is n has a probability of 1/10^n and everything whose probability is greater than zero will occur.

MarkMLl

  • Hero Member
  • *****
  • Posts: 8572
Re: My little stupid pi discoveries
« Reply #18 on: December 16, 2022, 02:59:24 pm »
An infinite set is one that contains a subset that is 'as great' (google translated wrong finnish word 'mahtava') as the set itself. So that might make sense?

You need to capitalise that "F": your meaning almost eluded me :-)

It gets worse. If the 3.14... sequence repeats after (say) 10^666 digits have been skipped, then after a further 10^666 digits have been skipped one finds the same sequence restarting... and so on ad infinitum.

Which would appear to suggest that either our understanding of Pi is wrong, or that Cantor was.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Thaddy

  • Hero Member
  • *****
  • Posts: 19150
  • Glad to be alive.
Re: My little stupid pi discoveries
« Reply #19 on: December 16, 2022, 03:08:48 pm »
I believe that Cantor would argue that if pi truly does contain an infinite number of digits, then somewhere in pi is the digit sequence representing the true value of pi... not just an approximation.
Yes. But the single possible occurrence of Pi is Pi itself (that is also the proof). Subsequent occurrences of approximate Pi are subsets and there for defined and finite.
objects are fine constructs. You can even initialize them with constructors.

Petri

  • New Member
  • *
  • Posts: 20
Re: My little stupid pi discoveries
« Reply #20 on: December 16, 2022, 03:17:53 pm »
Yes. But the single possible occurrence of Pi is Pi itself (that is also the proof). Subsequent occurrences of approximate Pi are subsets and there for defined and finite.
Subset do not must be finite. 2N is a subset of N, but both are infinite

mika

  • Full Member
  • ***
  • Posts: 137
Re: My little stupid pi discoveries
« Reply #21 on: December 16, 2022, 03:31:28 pm »
The fact that there is any finite sequence of numbers in pi is easier to understand: since the decimals of pi are proven to be random, then any finite sequence whose length is n has a probability of 1/10^n and everything whose probability is greater than zero will occur.
I will take it. I forgot the fact that pi is sequence of randomly distributed digits.

Which would appear to suggest that either our understanding of Pi is wrong, or that Cantor was.
There is nothing wrong for Cantor to be wrong. Pi does not contain pi within itself. It does come from pi being irrational.
« Last Edit: December 16, 2022, 03:53:40 pm by mika »

Petri

  • New Member
  • *
  • Posts: 20
Re: My little stupid pi discoveries
« Reply #22 on: December 18, 2022, 01:25:32 am »
Is there better 'rational pi' than 355/113?

355/113= 3.141592... is a very very good approximation for pi. With six digits, you get seven significant digits correctly. Is there a better number-saving division in the universe? In other words, two fewer digits are needed to mark the division calculation than the number of digits that the result correctly calculates?

I have not found. Yet. How should you look for them? Surely there must be? I mean, is there a division calculus where (n-2) numbers get n numbers correctly? Competition: who find it first? :)

Code: Pascal  [Select][+][-]
  1. program RationalPi;
  2. uses bigdecimalmath;
  3. type stri = array[1..80] of char;
  4. var A,B,approx:BigDecimal;
  5.         right,i,best,len:LongInt;
  6.         strA,strB,strPI:stri;
  7.         piStr:String;
  8. begin
  9.         piStr:= '3.141592653589793238462643383279502884197169399375';
  10.         A:=355;//3.141592920353982300884955752212
  11.         B:=113;
  12.         writeln('Very good approximation for pi is 355/113 ',355/113,' Is there better?');
  13.         A:=1;
  14.         best:=0;
  15.         while A<=100000000 do
  16.         begin
  17.                 strA:=BigDecimalToStr(A);
  18.                 Right:=0;
  19.                 B:=round(StrToBigDecimal(piStr)*A);
  20.                 strB:=BigDecimalToStr(B);
  21.                 approx:=divide(B,A,9999);
  22.                 strPI:=BigDecimalToStr(approx);
  23.                 i:=1;
  24.                 while(strPI[i]=piStr[i]) do
  25.                         begin
  26.                                 Right:=Right+1;
  27.                                 i:=i+1;
  28.                         end;
  29.                 len:=Length(BigDecimalToStr(A))+Length(BigDecimalToStr(B));
  30.                 if right>best then
  31.                         begin
  32.                                 writeln(Copy(strB,1,len),'/',Copy(strA,1,len),'=','  ',strPI,'  ',Right-1,'  ',len);
  33.                                 if (Right-1)>len then writeln('Heureka!!');
  34.                                 best:=right;
  35.                         end;
  36.                 A:=A+1;
  37.         end;
  38. end.
So far my program has just printed:
Quote
Very good approximation for pi is 355/113  3.14159292035398230087E+0000 Is there better?
3 /1 =  3                                                                                 0  2
13 /4  =  3.25                                                                              1  3
19 /6  =  3.166666666666666666666666666666666666666666666666666666666666666666666666666666  2  3
22 /7  =  3.142857142857142857142857142857142857142857142857142857142857142857142857142857  3  3
245  /78   =  3.141025641025641025641025641025641025641025641025641025641025641025641025641025  4  5
333   /106   =  3.141509433962264150943396226415094339622641509433962264150943396226415094339622  5  6
355   /113   =  3.141592920353982300884955752212389380530973451327433628318584070796460176991150  7  6
Heureka!!
86953     /27678     =  3.141592600621432184406387744779247055423079702290627935544475756918852518245537  8  10
102928     /32763      =  3.141592650245703995360620211824314012758294417483136464914690351921374721484601  9  11
103993     /33102      =  3.141592653011902604072261494773729684007008639961331641592653011902604072261494  10  11
521030      /165849      =  3.141592653558357300918305205337385211849332826848518833396643935145825419508106  11  12
833719      /265381      =  3.141592653581077771204419306581857781830651026260357749801229176165588342797713  12  12


MarkMLl

  • Hero Member
  • *****
  • Posts: 8572
Re: My little stupid pi discoveries
« Reply #23 on: December 18, 2022, 09:12:43 am »
two fewer digits are needed to mark the division calculation than the number of digits that the result correctly calculates?

Assuming decimal digits, and assuming that the representation of the division operator and decimal point are "noise" (lest anybody claim that ÷ is actually two bytes :-)

I agree: interesting question.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

srvaldez

  • Full Member
  • ***
  • Posts: 201
Re: My little stupid pi discoveries
« Reply #24 on: December 21, 2022, 02:01:01 am »
Hi Petri  :)
I am not proficient in Pascal or bigdecimalmath so here's a crude little program that will print the convergents of Pi
see http://oeis.org/A002485 and http://oeis.org/A002486
Code: [Select]
    program RationalPi;
    uses bigdecimalmath;

var
n0, n1, n2, ip, fp, pi, one:BigDecimal;
d0, d1, d2:BigDecimal;
i:LongInt;
str:String;
begin
n0:=StrToBigDecimal ('0.000000000000000000000000000000000000000000000000');
n1:=StrToBigDecimal ('1.000000000000000000000000000000000000000000000000');
d0:=StrToBigDecimal ('1.000000000000000000000000000000000000000000000000');
d1:=StrToBigDecimal ('0.000000000000000000000000000000000000000000000000');
one:=StrToBigDecimal('1.000000000000000000000000000000000000000000000000');
pi:=StrToBigDecimal ('3.141592653589793238462643383279502884197169399375');
fp:=pi;
for i:=0 to 42 do begin
ip:=round(fp, 0, bfrmTrunc);
fp:=one/(fp-ip);
n2:=ip*n1+n0;
d2:=ip*d1+d0;
n0:=n1;
n1:=n2;
d0:=d1;
d1:=d2;
str:=BigDecimalToStr(n2)+'/'+BigDecimalToStr(d2)+'  '+BigDecimalToStr(pi-divide(n2,d2,50));
writeln(str);
end;
end.
« Last Edit: December 21, 2022, 02:35:06 am by srvaldez »

 

TinyPortal © 2005-2018