I don't like to think there are magics in the aritmetic, but...

For everything that's not in any way related to PureBasic. General chat etc...
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

I don't like to think there are magics in the aritmetic, but...

Post by Psychophanta »

I don't like to think there are magics in the aritmetic, just like the old and new pitagorics school think, but...
Pitagoric old school believed universe is made by numbers, and new people who continues that thinking, believes Universe is arimetic (mathematic).

This is just a curious example, the so called "Wallis product":

Code: Select all

a.q=2
b.q=1
r.d=1
n.q=10000000
For i=1 To n
  r.d*a*a:a+2
  r.d/b/b:b+2
Next
r/n
Debug r
debug #PI
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
Cyllceaux
Enthusiast
Enthusiast
Posts: 510
Joined: Mon Jun 23, 2014 1:18 pm

Re: I don't like to think there are magics in the aritmetic, but...

Post by Cyllceaux »

Image
BarryG
Addict
Addict
Posts: 4163
Joined: Thu Apr 18, 2019 8:17 am

Re: I don't like to think there are magics in the aritmetic, but...

Post by BarryG »

The output:

Code: Select all

3.1415927321308840802771556
3.1415926535897931159979635
Quin
Addict
Addict
Posts: 1132
Joined: Thu Mar 31, 2022 7:03 pm
Location: Colorado, United States
Contact:

Re: I don't like to think there are magics in the aritmetic, but...

Post by Quin »

BarryG wrote: Sun Apr 06, 2025 1:45 pm The output:

Code: Select all

3.1415927321308840802771556
3.1415926535897931159979635
So...pi. Okay?
I've seen way weirder things in my life that have made me believe in higher powers than some code producing the result of pi. I'm not dissing you, just to be clear, but I'm just not seeing the significance here, would you mind explaining a bit more?
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Re: I don't like to think there are magics in the aritmetic, but...

Post by Psychophanta »

http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
User avatar
Piero
Addict
Addict
Posts: 894
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: I don't like to think there are magics in the aritmetic, but...

Post by Piero »

Image
User avatar
Piero
Addict
Addict
Posts: 894
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: I don't like to think there are magics in the aritmetic, but...

Post by Piero »

Quin wrote: Sun Apr 06, 2025 3:39 pmI've seen way weirder things in my life that have made me believe in higher powers than some code producing the result of pi.
Amazing grace! how sweet the sound,
That saved a wretch; like me!
I once was lost, but now am found,
Was blind, but now I see.
Olli
Addict
Addict
Posts: 1232
Joined: Wed May 27, 2020 12:26 pm

Re: I don't like to think there are magics in the aritmetic, but...

Post by Olli »

Pi has been discovered in the Indiana (US) since only 150 years. Since more than 30 years, the universe has forced me to believe the Pi was discovered at the Greek's, since 2000 years. I am disgusted, near... depressed...

Source
User avatar
Piero
Addict
Addict
Posts: 894
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: I don't like to think there are magics in the aritmetic, but...

Post by Piero »

Psychophanta wrote: Sun Apr 06, 2025 10:24 amThis is just a curious example, the so called "Wallis product"
Is yours an improved Wallis?
I'm curious because it should be smaller than π (https://upload.wikimedia.org/wikipedia/ ... series.svg)

Code: Select all

n=100000000
n2=n*2
Debug #PI

r.d=3 ; π=3+4/(2·3·4)-4/(4·5·6)+4/(6·7·8)-4/(8·9·10)… Nilakantha Somayaji
a=2:b=1
; StartTime.q = ElapsedMilliseconds()
For i=1 To n
   r+4/(a*(a+1)*(a+2))*b
   b*-1:a+2
Next
; Debug ElapsedMilliseconds() - StartTime
Debug r

r.d=1 ; Wallis
; StartTime.q = ElapsedMilliseconds()
For i=1 To n
   s.d=4*i*i
   r*s/(s-1)
Next
; Debug ElapsedMilliseconds() - StartTime
r*2
Debug r

r.d=1 ; Psychophanta Modified (Test)
; StartTime.q = ElapsedMilliseconds()
For i=1 To n2 step 2
   r*(i+1)*(i+1)/i/i
Next
; Debug ElapsedMilliseconds() - StartTime
r/n2*2
Debug r

r.d=1 ; Psychophanta
a=2:b=1
; StartTime.q = ElapsedMilliseconds()
For i=1 To n
  r.d*a*a:a+2
  r.d/b/b:b+2
Next
; Debug ElapsedMilliseconds() - StartTime
r/n
Debug r
tj1010
Enthusiast
Enthusiast
Posts: 716
Joined: Mon Feb 25, 2013 5:51 pm

Re: I don't like to think there are magics in the aritmetic, but...

Post by tj1010 »

I'm no genius, I stopped at differential equations and abstract algebra ~12 years ago, but I'm fairly certain you can't 'figure out' large dynamical systems you don't even have a whole map of using obvious patterns in small states of it.. Which was what was being worked on when this was found by Wallis in the seventeenth century AD..

By the way there are at least three ways to do this more efficiently in calculus that were discovered within a quarter-century of Wallis
Post Reply