<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>http://digida.mgpu.ru/index.php?action=history&amp;feed=atom&amp;title=Calculating_Pi</id>
	<title>Calculating Pi - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://digida.mgpu.ru/index.php?action=history&amp;feed=atom&amp;title=Calculating_Pi"/>
	<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Calculating_Pi&amp;action=history"/>
	<updated>2026-05-21T15:32:26Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>http://digida.mgpu.ru/index.php?title=Calculating_Pi&amp;diff=1766&amp;oldid=prev</id>
		<title>Patarakin: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Calculating_Pi&amp;diff=1766&amp;oldid=prev"/>
		<updated>2022-07-21T08:33:16Z</updated>

		<summary type="html">&lt;p&gt;1 версия импортирована&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия от 11:33, 21 июля 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Patarakin</name></author>
	</entry>
	<entry>
		<id>http://digida.mgpu.ru/index.php?title=Calculating_Pi&amp;diff=1765&amp;oldid=prev</id>
		<title>scratch&gt;Jammum: several minor changes and rewordings</title>
		<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Calculating_Pi&amp;diff=1765&amp;oldid=prev"/>
		<updated>2020-08-19T14:49:22Z</updated>

		<summary type="html">&lt;p&gt;several minor changes and rewordings&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
There are many ways to calculate pi (π) which is defined by Wikipedia below:&lt;br /&gt;
{{quote|The number π (/paɪ/) is a mathematical constant. It is defined as the ratio of a circle&amp;#039;s circumference to its diameter, and it also has various equivalent definitions. It appears in many formulas in all areas of mathematics and physics. It is approximately equal to 3.14159. It has been represented by the Greek letter &amp;quot;π&amp;quot; since the mid-18th century, and is spelled out as &amp;quot;pi&amp;quot;. It is also referred to as Archimedes&amp;#039; constant.|[[Wikipedia:Pi|The Wikipedia entry for Pi]]}}&lt;br /&gt;
&lt;br /&gt;
Here are just of few of the methods that have been proposed to calculate this value.&lt;br /&gt;
&lt;br /&gt;
== Method One ==&lt;br /&gt;
The script below is one method to calculate pi:&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when green flag clicked&lt;br /&gt;
set [pi v] to (4)&lt;br /&gt;
set [Refreshes v] to (1)&lt;br /&gt;
forever&lt;br /&gt;
    change [Refreshes v] by (2)&lt;br /&gt;
    set [pi v] to ((pi) - ((4)/(Refreshes)))&lt;br /&gt;
    change [Refreshes v] by (2)&lt;br /&gt;
    set [pi v] to ((pi) + ((4)/(Refreshes)))&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
This script will constantly make the [[variable]] π closer and closer to the actual number π. &amp;lt;br&amp;gt;&lt;br /&gt;
This is called the Gregory-Leibniz series.&lt;br /&gt;
&lt;br /&gt;
== Method Two ==&lt;br /&gt;
{{note|This method is more complicated, but arrives on pi quicker.}}&lt;br /&gt;
Below is another method for calculating pi:&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when gf clicked&lt;br /&gt;
set [pi v] to (3)&lt;br /&gt;
set [Refreshes v] to (2)&lt;br /&gt;
forever&lt;br /&gt;
    set [pi v] to ((pi) + ((4)/((Refreshes) * (((Refreshes) + (1)) * ((Refreshes) + (2))))))&lt;br /&gt;
    change [Refreshes v] by (2)&lt;br /&gt;
    set [pi v] to ((pi) - ((4)/((Refreshes) * (((Refreshes) + (1)) * ((Refreshes) + (2))))))&lt;br /&gt;
    change [Refreshes v] by (2)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
This is referred to as the Nilakantha series.&lt;br /&gt;
&lt;br /&gt;
== Method Three ==&lt;br /&gt;
{{note|This method is simpler and does the calculation instantly.}}&lt;br /&gt;
The higher that the variable &amp;quot;n&amp;quot; is, the closer to pi the output will be.&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
ask [Please enter n:] and wait&lt;br /&gt;
set [n v] to (answer)&lt;br /&gt;
set [pi v] to ((n) * ([sin v] of ((180) / (n)):: operators ))&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
This method was used by Archimedes to calculate the original pi. This method can never actually get the exact value of pi using this method, but like all the other methods it can give enough exactness to be used in a [[project]].&lt;br /&gt;
&lt;br /&gt;
==Speeding up the Program==&lt;br /&gt;
One way to make the [[program]] much faster is to use a run without screen refresh [[My Blocks|custom block]], however this may cause issues on some mobile devices. To do this, see below:&lt;br /&gt;
&lt;br /&gt;
===For Method One===&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when green flag clicked&lt;br /&gt;
set [pi v] to (4)&lt;br /&gt;
set [Refreshes v] to (1)&lt;br /&gt;
forever&lt;br /&gt;
    Update::custom&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
define Update // Run without screen refresh&lt;br /&gt;
repeat (100)&lt;br /&gt;
    change [Refreshes v] by (2)&lt;br /&gt;
    set [pi v] to ((pi) - ((4)/(Refreshes)))&lt;br /&gt;
    change [Refreshes v] by (2)&lt;br /&gt;
    set [pi v] to ((pi) + ((4)/(Refreshes)))&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===For Method Two===&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when gf clicked&lt;br /&gt;
set [pi v] to (3)&lt;br /&gt;
set [Refreshes v] to (2)&lt;br /&gt;
forever&lt;br /&gt;
    Update method 2 :: custom&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
define Update method 2 //Run without screen refresh&lt;br /&gt;
repeat (100)&lt;br /&gt;
    set [pi v] to ((pi) + ((4)/((Refreshes) * (((Refreshes) + (1)) * ((Refreshes) + (2))))))&lt;br /&gt;
    change [Refreshes v] by (2)&lt;br /&gt;
    set [pi v] to ((pi) - ((4)/((Refreshes) * (((Refreshes) + (1)) * ((Refreshes) + (2))))))&lt;br /&gt;
    change [Refreshes v] by (2)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting Tutorials]][[Category:Math Tutorials]]&lt;/div&gt;</summary>
		<author><name>scratch&gt;Jammum</name></author>
	</entry>
</feed>