Contenuto cancellato Contenuto aggiunto
Eginardo (discussione | contributi)
-Bio
 
(179 versioni intermedie di 9 utenti non mostrate)
Riga 1:
{{quote|La verità è che i cetrioli vaganti riempiono densamente lo spazio in maniera isotropa, con velocità anch'esse isotrope. Cosicché qualsiasi posizione tu assuma la probabilità di un urto anelastico sono sempre non nulle, e la sezione d'urto troppo grande.|Blazar il saggio}}
Esistono diversi metodi per il '''calcolo di π'''.
==Metodi standard==
===Cerchi===
π può essere ottenuto a partire da un cerchio di raggio ed area noti, essendo l'area data dalla formula:
 
{{BabelfishTop|[[Wikipedia:Babelfish]]}}
:<math> A = \pi r^2\,\!,</math>
{{SchedaBabelfish|Sigla=[[Immagine:Wikipedia-logo.png|left|50px]]|Testo=Questo utente apprezza Wikipedia e i Wikipediani.}}
{{SchedaBabelfish|Sigla=[[Immagine:Iceweasel.png|left|50px]]|Testo=Questo utente usa [[Iceweasel]].}}
{{SchedaBabelfish|Sigla=[[Immagine:Crystal Clear app tux.png|left|50px]]|Testo=Questo utente è un sostenitore di [[Tux|GNU/Linux]] e del Free Software.}}
{{Software utente|software=Debian|uso=si|consiglio=si}}
{{Software utente|software=Latex|uso=si|consiglio=}}
 
{{BabelfishSezione|[[Wikipedia:Babel]]}}
che permette di calcolare esplicitamente π:
{{Utente it}}
:<math> \pi = A/r^2.\,\!</math>
{{Utente en-3}}
{{Utente la-1}}
{{BabelfishBottom}}
 
== Dati personali ==
Se un cerchio di raggio ''r'' viene disegnato con il suo centro nel punto (0,0), qualsiasi punto la cui distanza dall'orifine sia minore o uguale a ''r'' sarà all'interno del cerchio. Il [[teorema di Pitagora]] dà la distanza di qualsiasi punto (''x'',''y'') dall'origine:
Sono laureato in fisica, ma ancora non ho smesso di studiare!
 
Credo fortemente nella libera circolazione del sapere, e quindi utilizzo comunemente [[Linux]] - ed in particolare [[Debian]] (ed ovviamente collaboro saltuariamente con Wikipedia). Una massima che mi ha sempre colpito è
:<math>d=\sqrt{x^2+y^2}.</math>
 
{{quote|Faber est suae quisque fortunae|Appio Claudio Cieco}}
Il "foglio da disegno" matematico * costruito pensando quadrati di lato unitario centrati attorno ad ogni punto (''x'',''y''), dove ''x'' e ''y'' sono gli interi compresi fra ''-r'' e ''r''. I quadrati i cui centri siano dentro o sulla [[circonferenza]] possono essere contati verificando per ciascuno se
 
Non sono assolutamente convinto che sia così, ma si deve lavorare perché lo sia!
:<math>\sqrt{x^2+y^2} \le r.</math></center>
 
Così ho iniziato a collaborare con Wikipedia:
Il numero di punti che soddisfano la condizione approssima allora l'area del cerchio, che può essere usata per calcolare un approssimazione di <math>\pi</math>.
 
14:26, 30 ott [[2006]] (cron) (diff) [[Prodotto tensoriale]].
La formula può essere scritta come:
 
Ma già prima la consultavo (anche se solo nella versione inglese!).
:<math>\pi \approx \frac{1}{r^2} \sum_{x=-r}^{r} \; \sum_{y=-r}^{r} \Big(1\hbox{ se }\sqrt{x^2+y^2} \le r,\; 0\hbox{ altrimenti}\Big).</math>
 
Per informazioni sugli edit si acceda [http://tools.wikimedia.de/~interiot/cgi-bin/count_edits?user=eginardo&dbname=itwiki_p qui].
In altre parole, si comincia scegliendo un valore di ''r''; si considerano tutti i punti (''x'',''y'') per i quali sia ''x'' sia ''y'' siano interi compresi fra ''−r'' and ''r''. Partendo da zero, si aggiunge uno per ciascun punto la cui distanza dall'origine (0,0) sia minore o uguale a ''r''. Al termine, si divide la somma così ottenuta — rappresentante l'area del cerchio di raggio ''r'' — per l'intero ''r''<sup>2</sup> per trovare un'approsimazione di π. Si ottengono migliori approssimazioni per valori maggiori di ''r''.
 
{{quote|</br>If you can keep your head when all about you</br>
Per esempio, se ''r'' è 5, allora i punti considerati sono:
Are losing theirs and blaming it on you;</br>
If you can trust yourself when all men doubt you,</br>
But make allowance for their doubting too:</br>
If you can wait and not be tired by waiting,</br>
Or being lied about, don’t deal in lies,</br>
Or being hated, don’t give way to hating,</br>
And yet don’t look too good, nor talk too wise;</br>
</br>
If you can dream—and not make dreams your master;</br>
If you can think—and not make thoughts your aim,</br>
If you can meet with Triumph and Disaster</br>
And treat those two imposters just the same:</br>
If you can bear to hear the truth you’ve spoken</br>
Twisted by knaves to make a trap for fools,</br>
Or watch the things you gave your life to, broken,</br>
And stoop and build ’em up with worn-out tools;</br>
</br>
If you can make one heap of all your winnings</br>
And risk it on one turn of pitch-and-toss,</br>
And lose, and start again at your beginnings</br>
And never breathe a word about your loss:</br>
If you can force your heart and nerve and sinew</br>
To serve your turn long after they are gone,</br>
And so hold on when there is nothing in you</br>
Except the Will which says to them: "Hold on!"</br>
</br>
If you can talk with crowds and keep your virtue,</br>
Or walk with Kings—nor lose the common touch,</br>
If neither foes nor loving friends can hurt you,</br>
If all men count with you, but none too much:</br>
If you can fill the unforgiving minute</br>
With sixty seconds’ worth of distance run,</br>
Yours is the Earth and everything that’s in it,</br>
And—which is more—you’ll be a Man, my son!</br>|[[Rudyard Kipling]]}}
 
Attualmente utilizzo lo skin di [[Utente:Kormoran]].
:{| style="font-size:75%;text-align:center;color:#0081cd;height:1em" cellspacing="15"
|- style="color:black"
| (−5,5) || (−4,5) || (−3,5) || (−2,5) || (−1,5) || style="color:#bc1e47" | (0,5) || (1,5) || (2,5) || (3,5) || (4,5) || (5,5)
|-
| style="color:black" | (−5,4) || style="color:black" | (−4,4) || style="color:#bc1e47" | (−3,4) || (−2,4) || (−1,4) || (0,4) || (1,4) || (2,4) || style="color:#bc1e47" | (3,4) || style="color:black" | (4,4) || style="color:black" | (5,4)
|-
| style="color:black" | (−5,3) || style="color:#bc1e47" | (−4,3) || (−3,3) || (−2,3) || (−1,3) || (0,3) || (1,3) || (2,3) || (3,3) || style="color:#bc1e47" | (4,3) || style="color:black" | (5,3)
|-
| style="color:black" | (−5,2) || (−4,2) || (−3,2) || (−2,2) || (−1,2) || (0,2) || (1,2) || (2,2) || (3,2) || (4,2) || style="color:black" | (5,2)
|-
| style="color:black" | (−5,1) || (−4,1) || (−3,1) || (−2,1) || (−1,1) || (0,1) || (1,1) || (2,1) || (3,1) || (4,1) || style="color:black" | (5,1)
|-
| style="color:#bc1e47" | (−5,0) || (−4,0) || (−3,0) || (−2,0) || (−1,0) || (0,0) || (1,0) || (2,0) || (3,0) || (4,0) || style="color:#bc1e47" | (5,0)
|-
| style="color:black" | (−5,−1) || (−4,−1) || (−3,−1) || (−2,−1) || (−1,−1) || (0,−1) || (1,−1) || (2,−1) || (3,−1) || (4,−1) || style="color:black" | (5,−1)
|-
| style="color:black" | (−5,−2) || (−4,−2) || (−3,−2) || (−2,−2) || (−1,−2) || (0,−2) || (1,−2) || (2,−2) || (3,−2) || (4,−2) || style="color:black" | (5,−2)
|-
| style="color:black" | (−5,−3) || style="color:#bc1e47" | (−4,−3) || (−3,−3) || (−2,−3) || (−1,−3) || (0,−3) || (1,−3) || (2,−3) || (3,−3) || style="color:#bc1e47" | (4,−3) || style="color:black" | (5,−3)
|-
| style="color:black" | (−5,−4) || style="color:black" | (−4,−4) || style="color:#bc1e47" | (−3,−4) || (−2,−4) || (−1,−4) || (0,−4) || (1,−4) || (2,−4) || style="color:#bc1e47" | (3,−4) || style="color:black" | (4,−4) || style="color:black" | (5,−4)
|- style="color:black"
| (−5,−5) || (−4,−5) || (−3,−5) || (−2,−5) || (−1,−5) || style="color:#bc1e47" | (0,−5) || (1,−5) || (2,−5) || (3,−5) || (4,−5) || (5,−5)
|}
 
== Ringraziamenti ==
I 12 punti (0,±5), (±5,0), (±3,±4), (±4,±3) sono <span style="color:#bc1e47">esattamente sulla</span> circonferenza, e ci sono 69 punti <span style="color:#0081cd">completamente all'interno</span>, così l'area approssimata vale 81, e π vale in questa approssimazione 3.24. Risultati per diversi ''r'' sono riportati nella tabella seguente:
Voglio ringraziare tutti coloro dai quali ho copiato per personalizzare la mia pagina personale (l'unico che conosco, e che quindi ricordo, è [[Utente:Blawinol|Blazar]]).
 
[[Categoria:Utenti lombardi|Eginardo]]
<center>
{| class="wikitable" style="text-align:center"
|-
! r !! Area !! Approssimazione di π
|-
| 2 || 13 || 3.25
|-
| 3 || 29 || 3.22222
|-
| 4 || 49 || 3.0625
|-
| 5 || 81 || 3.24
|-
| 10 || 317 || 3.17
|-
| 20 || 1257 || 3.1425
|-
| 100 || 31417 || 3.1417
|-
| 1000 || 3141549 || 3.141549
|}
</center>
 
In modo simile, gli algoritmi più complessi riportati di seguito coinvolgono calcoli ripetuti di qualche tipo, e portano ad approssimazioni migliori al crescere del numero di calcoli.
 
===Frazioni continue===
A parte la rappresentazione in termini di [[frazione continua|frazioni continue]] [3; 7, 15, 1, 292, 1, 1, …], che non mostra alcuno schema riconoscibile, ''π'' ha molte rappresentazioni come [[frazione continua generalizzata]], incluse le seguenti:
 
:<math>
\pi=3 + \cfrac{1}{6 + \cfrac{9}{6 + \cfrac{25}{6 + \cfrac{49}{6 + \cfrac{81}{6 + \cfrac{121}{\ddots\,}}}}}}
</math>
 
:<math>
\frac{4}{\pi} = 1 + \cfrac{1}{3 + \cfrac{4}{5 + \cfrac{9}{7 + \cfrac{16}{9 + \cfrac{25}{11 + \cfrac{36}{13 + \cfrac{49}{\ddots}}}}}}}
</math>
 
(Altre rappresentazioni si trovano presso [http://functions.wolfram.com/Constants/Pi/10/ The Wolfram Functions Site].)
 
===Trigonometria===
La [[formula di Leibniz per pi|serie di Gregory-Leibniz]]
: <math>\frac{\pi}{4} = \frac{1}{1} - \frac{1}{3} + \frac{1}{5} - \frac{1}{7} + \cdots + \frac{(-1)^i}{2i+1} + \cdots</math>
 
è la serie di potenze di [[arcotangente|arctan]](x) nel caso particolare <math>x=1</math>; la sua velocità di convergenza è troppo lenta perché sia di interesse pratico. Comunque, la serie converge molto più rapidamente per piccoli valori di <math>x</math>; si giunge quindi a formule dove <math>\pi</math> si ricava come somma di tangenti razionali, come quella di [[John Machin]]:
 
: <math>\frac{\pi}{4} = 4 \arctan\frac{1}{5} - \arctan\frac{1}{239}</math>
 
Formule per <math>\pi</math> di questo tipo sono note come formule di tipo Machin.
 
Considerando un triangolo equilatero ed osservando che
:<math>\sin(\frac{\pi}{6})=1/2</math>
 
si trova che:
 
:<math>\pi = 3 \sum_{n=0}^\infty \frac{(2n)!}{n!^2 (2n+1) 2^{4n}} = 3 + \frac{1}{8} + \frac{9}{640} + \frac{15}{7168} + ... </math>
 
===The Salamin-Brent algorithm===
 
L'[[Algoritmo di Gauss-Legendre|algoritmo di Salamin-Brent]] fu scoperto indipendentemente da [[Richard Brent]] and [[Eugene Salamin]] nel [[1975]]. Permette di calcolare <math>\pi</math> fino a N [[cifra significativa|cifre significative]] in un tempo proporzionale a N&nbsp;log(N)&nbsp;log(log(N)), molto più velocemente delle formule trigonometriche.
 
==Metodi di estrazioni di cifre==
=== Formula BBP (base 16)===
La formula BBP(Bailey-Borwein-Plouffe) per calcolare <math>\pi</math> fu scoperta nel 1995 da Simon Plouffe. La formula calcola <math>\pi</math> in base 16 senza bisogno di calcolare le cifre precedenti ("estrazione di cifre").
<ref>MathWorld: Formula BBP http://mathworld.wolfram.com/BBPFormula.html</ref>
: <math>\pi=\sum_{n=0}^\infty \left(\frac{4}{8n+1}-\frac{2}{8n+4}-\frac{1}{8n+5}-\frac{1}{8n+6}\right)\left(\frac{1}{16}\right)^n</math>
 
===Miglioramento di Bellard (base 64)===
An alternative formula for computing pi in base 64 was derived by [[Fabrice Bellard]]. This makes computing binary digits of pi 43% faster. <ref>Bellard's Website: http://fabrice.bellard.free.fr/pi/pi_bin/pi_bin.html</ref>
 
: <math>\pi=\frac{1}{2^6}\sum_{n=0}^\infty \frac{(-1)^n}{2^{10n}} (-\frac{2^5}{4n+1}-\frac{1}{4n+3}+\frac{2^8}{10n+1}-
\frac{2^6}{10n+3}-\frac{2^2}{10n+5}-\frac{2^2}{10n+7}+\frac{1}{10n+9})</math>
 
===Extending to arbitrary bases===
In 1996, Simon Plouffe derived an algorithm to calculate successive digits of pi in an arbitrary base in [[big O notation|O]](''n''<sup>3</sup>log(n)<sup>3</sup>) time. <ref>Simon Plouffe, ''On the computation of the n'th decimal digit of various transcendental numbers'', November 1996</ref>
 
===Improvement using the [[Bill Gosper|Gosper]] formula===
In 1997, [[Fabrice Bellard]] improved Plouffe's formula for digit-extraction in an arbitrary base to reduce the runtime to [[big O notation|O]](''n''<sup>2</sup>). <ref>Bellard's Website: http://fabrice.bellard.free.fr/pi/pi_n2/pi_n2.html</ref>
 
==Projects==
===Pi Hex===
Pi Hex computed binary bits of Pi over a distributed network employing several hundred computers. They distributed computation of single hexadecimal digits in the billionth's of places. Pi Hex ended in 2000 and since then their website has faded into history.
 
===Background pi===
Inspired by Pi Hex and Project Pi, [http://backpi.sourceforge.net/ Background Pi] seeks to compute decimal digits of pi sequentially. The project has computed over a hundred thousand digits using spare CPU cycles. Background Pi is oriented to be more for an average end user than for a power user offering an unobtrusive user interface. Research is underway on the efficiency of converting computed hex digits to decimal as computing hex digits is faster than computing decimal. A new version is in development that would manage multiple computation projects in a friendlier interface than [[Berkeley_Open_Infrastructure_for_Network_Computing|BOINC]].
 
 
==Riferimenti==
<references/>
 
 
== Collegamenti esterni ==
*[http://www.lrz-muenchen.de/~hr/numb/pi-irr.html Una prova del fatto che Pi è irrazionale]
*[http://mathworld.wolfram.com/PiFormulas.html Molte formule per &pi;, dal sito della Wolfram Mathematics]
* [http://machination.mysite.freeserve.com/ Una raccolta di formule di tipo Machin per i calcolo del pi greco]
*[http://groups.yahoo.com/group/pi-hacks Il pi-hacks Yahoo! Group]
*[http://oldweb.cecm.sfu.ca/projects/pihex/index.html PiHex Project]