QB64 Phoenix Edition
Getting ready for Pi-Day - Printable Version

+- QB64 Phoenix Edition (https://staging.qb64phoenix.com)
+-- Forum: QB64 Rising (https://staging.qb64phoenix.com/forumdisplay.php?fid=1)
+--- Forum: Code and Stuff (https://staging.qb64phoenix.com/forumdisplay.php?fid=3)
+---- Forum: Programs (https://staging.qb64phoenix.com/forumdisplay.php?fid=7)
+---- Thread: Getting ready for Pi-Day (/showthread.php?tid=1531)



Getting ready for Pi-Day - bplus - 03-06-2023

Piral:
Code: (Select All)
_Title "Piral" ' b+ 2023-03-05
p$ = "3.14159265358979323846264338327950288419716939937510"
p$ = p$ + "58209749445923078164062862089986280348253421170679"
p$ = p$ + "82148086513282306647093844609550582231725359408128"
p$ = p$ + "48111745028410270193852110555964462294895493038196"
p$ = p$ + "44288109756659334461284756482337867831652712019091"
p$ = p$ + "45648566923460348610454326648213393607260249141273"
p$ = p$ + "72458700660631558817488152092096282925409171536436"
p$ = p$ + "78925903600113305305488204665213841469519415116094"
p$ = p$ + "33057270365759591953092186117381932611793105118548"
p$ = p$ + "07446237996274956735188575272489122793818301194912"
p$ = p$ + "98336733624406566430860213949463952247371907021798"
p$ = p$ + "60943702770539217176293176752384674818467669405132"
p$ = p$ + "00056812714526356082778577134275778960917363717872"
p$ = p$ + "14684409012249534301465495853710507922796892589235"
p$ = p$ + "42019956112129021960864034418159813629774771309960"
p$ = p$ + "51870721134999999837297804995105973173281609631859"
p$ = p$ + "50244594553469083026425223082533446850352619311881"
p$ = p$ + "71010003137838752886587533208381420617177669147303"
p$ = p$ + "59825349042875546873115956286388235378759375195778"
p$ = p$ + "18577805321712268066130019278766111959092164201989"

Screen _NewImage(710, 710, 32)
_ScreenMove 300, 50
xc = _Width / 2: yc = _Height / 2 - 4
i = 1
lastx = xc: lasty = yc
_PrintString (xc - 4, yc - 8), Mid$(p$, i, 1)
For a = 0 To 23 * _Pi Step .01
    x = xc + a * 5 * Cos(a): y = yc + a * 5 * Sin(a)
    If _Hypot(x - lastx, y - lasty) >= 20 Then
        i = i + 1
        ' Circle (x - 2, y - 2), 10
        _PrintString (x - 4, y - 8), Mid$(p$, i, 1)
        lastx = x: lasty = y
    End If
Next
Sleep



RE: Getting ready for Pi-Day - doppler - 03-07-2023

Here is a fun fact about PI.!.!.
Enter a 10 digit phone number into a search string.  With a large enough PI data set, you will locate that sequence.  Thanks to "Person of Interest" TV series for that tidbit of info.  I have tried every person I know, I found there phone numbers in the data set.

Another tidbit.  Prime95 program has a torture benchmark, using PI calculation.  Multi-threaded.
PS.  Don't run long on an under-cooled PC CPU.


RE: Getting ready for Pi-Day - bplus - 03-07-2023

(03-07-2023, 02:18 AM)doppler Wrote: Here is a fun fact about PI.!.!.
Enter a 10 digit phone number into a search string.  With a large enough PI data set, you will locate that sequence.  Thanks to "Person of Interest" TV series for that tidbit of info.  I have tried every person I know, I found there phone numbers in the data set.

Another tidbit.  Prime95 program has a torture benchmark, using PI calculation.  Multi-threaded.
PS.  Don't run long on an under-cooled PC CPU.

Well that's a great idea for some fun! How many digits does it take to get to your phone number?

I wonder if mine is in the first 1000 of p$

Nope! nor the 4 digit, nor the 3 digit! The 3 digit had a very good change I think. Now I am wondering about digit counts in Pi.


RE: Getting ready for Pi-Day - doppler - 03-07-2023

(03-07-2023, 03:53 AM)bplus Wrote:
(03-07-2023, 02:18 AM)doppler Wrote: Here is a fun fact about PI.!.!.
Enter a 10 digit phone number into a search string.  With a large enough PI data set, you will locate that sequence.  Thanks to "Person of Interest" TV series for that tidbit of info.  I have tried every person I know, I found there phone numbers in the data set.

Another tidbit.  Prime95 program has a torture benchmark, using PI calculation.  Multi-threaded.
PS.  Don't run long on an under-cooled PC CPU.

Well that's a great idea for some fun! How many digits does it take to get to your phone number?

I wonder if mine is in the first 1000 of p$

Nope! nor the 4 digit, nor the 3 digit! The 3 digit had a very good change I think. Now I am wondering about digit counts in Pi.

I am not sure if prime95 has a number dump function, could have been another.  My PH# was found somewhere around 34k in.  A recent publication of 1 Billion digit of PI was released last year.  Some YouTuber (math nut).  Purchased a physical copy.  The pile was taller that he was.  To get to 1 billion or was it 100 Billion took a PC running over 1 year to complete.  It became a record.  NIST, (yea those guys) consider the use of PI to be a NIST standard, needing publication.

Now that I think about it, prime95 is for factoring prime numbers.  Whoop's.  There are a number of torture benchmarks using PI calculation.  Really gets the electrons flowing. And can cook your CPU.  Prime95 is for over-clockers to test the stability of the system.

But I do stand by my tidbit about your phone number in PI.


RE: Getting ready for Pi-Day - bplus - 03-07-2023

Quote:Now that I think about it, prime95 is for factoring prime numbers.
Well for the record prime numbers are so because they can't be factored.

But there is an interest in getting larger and larger primes to factor really huge numbers. And so the search for ever higher primes goes just as obsessively if not more so than the search for more digits to pi.


RE: Getting ready for Pi-Day - mnrvovrfc - 03-07-2023

(03-07-2023, 12:49 PM)bplus Wrote: But there is an interest in getting larger and larger primes to factor really huge numbers. And so the search for ever higher primes goes just as obsessively if not more so than the search for more digits to pi.

I was sticking up the only computer I had a couple of years ago, to a QB64-created program that computed prime numbers quite close to 18 trilliard (unsigned 64-bit high limit). It was slow by standards of supercomputers of the 1980's but it was still blazing fast in my experience, especially my first IBM PC-compatible ever, Tandy1000HX. I would have to dig deep into my backups but perhaps I could post the program here. I'm going to start another thread for it, not this about the "circle" number.

The true aim of that program was to obtain a prime number that long which was palindromic. Rolleyes


RE: Getting ready for Pi-Day - DANILIN - 03-14-2023

Study of randomness of thousands of digits of pi
is possible according to 0-1 feature distribution program
on binomial spectrum

https://staging.qb64phoenix.com/showthread.php?tid=900&pid=13792#pid13792

While it turns out: numbers of pi are distributed randomly

[Image: ppzz55.gif] 170 kB
animation from xara3d

What if digits of pi are written backwards?
Get number e

Plus citizen of Russia Euler formula is known
e^(iπ) + 1 = 0
e^(iπ) = -1
https://en.wikipedia.org/wiki/Euler%27s_formula
& find animation & video visualization