<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Wed, 19 Jun 2013 00:49:19 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Tobias Schlitt's Blog: Randomized Pi calculation]]></title>
      <guid>http://www.phpdeveloper.org/news/7545</guid>
      <link>http://www.phpdeveloper.org/news/7545</link>
      <description><![CDATA[<p>
Since there is no "magic variable" to get a value for Pi in an application, <i>Tobias Schlitt</i> offers up <a href="http://schlitt.info/applications/blog/index.php?/archives/538-Randomized-Pi-calculation.html">the next best thing</a> - his homegrown solution for creating the value (using a randomized variation).
</p>
<blockquote>
I don't know which is the most common way to calculate Pi in computer programs, but from the stochastics book a read for my recent stochastics exam, I have a randomized variation, which is quite cool I think.
</blockquote>
<p>
The code example <a href="http://schlitt.info/applications/blog/index.php?/archives/538-Randomized-Pi-calculation.html">is included</a> along with a bit of explanation for those not familiar with the concepts behind it. It uses two of PHP functions, pow() and mt_rand(), to run through a series of iterations and, using a preset precision value, find the "hits" to finally calculate the value at the end.
</p>]]></description>
      <pubDate>Mon, 02 Apr 2007 10:04:00 -0500</pubDate>
    </item>
  </channel>
</rss>
