<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>spechal.com &#187; Excel</title>
	<atom:link href="http://spechal.com/category/excel/feed/" rel="self" type="application/rss+xml" />
	<link>http://spechal.com</link>
	<description>[spesh-uhl]</description>
	<lastBuildDate>Thu, 21 Jan 2010 11:50:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP function to emulate Excel NormSInv</title>
		<link>http://spechal.com/2009/11/15/php-function-to-emulate-excel-normsinv/</link>
		<comments>http://spechal.com/2009/11/15/php-function-to-emulate-excel-normsinv/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 15:58:56 +0000</pubDate>
		<dc:creator>Spechal</dc:creator>
				<category><![CDATA[Excel]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[emulator]]></category>

		<guid isPermaLink="false">http://spechal.com/?p=14</guid>
		<description><![CDATA[
&#60;?php

function NormSInv($p){
   $a1 = -39.6968302866538; $a2 = 220.946098424521; $a3 = -275.928510446969;
   $a4 = 138.357751867269; $a5 = -30.6647980661472; $a6 = 2.50662827745924;
   $b1 = -54.4760987982241; $b2 = 161.585836858041; $b3 = -155.698979859887;
   $b4 = 66.8013118877197; $b5 = -13.2806815528857; $c1 = -7.78489400243029E-03;
   $c2 = -0.322396458041136; $c3 = -2.40075827716184, $c4 [...]]]></description>
			<content:encoded><![CDATA[<pre class="php" name="code">
&lt;?php

function NormSInv($p){
   $a1 = -39.6968302866538; $a2 = 220.946098424521; $a3 = -275.928510446969;
   $a4 = 138.357751867269; $a5 = -30.6647980661472; $a6 = 2.50662827745924;
   $b1 = -54.4760987982241; $b2 = 161.585836858041; $b3 = -155.698979859887;
   $b4 = 66.8013118877197; $b5 = -13.2806815528857; $c1 = -7.78489400243029E-03;
   $c2 = -0.322396458041136; $c3 = -2.40075827716184, $c4 = -2.54973253934373;
   $c5 = 4.37466414146497; $c6 = 2.93816398269878; $d1 = 7.78469570904146E-03
   $d2 = 0.32246712907004; $d3 = 2.445134137143; $d4 = 3.75440866190742;
   $p_low = 0.02425; $p_high = 1 - $p_low;
   $q = 0.0; $r = 0.0;
   if($p &lt; 0 || $p &gt; 1){
      throw new Exception(&quot;NormSInv: Argument out of range.&quot;);
   } else if($p &lt; $p_low){
      $q = pow(-2 * log($p), 2);
      $NormSInv = ((((($c1 * $q + $c2) * $q + $c3) * $q + $c4) * $q + $c5) * $q + $c6) /
         (((($d1 * $q + $d2) * $q + $d3) * $q + $d4) * $q + 1);
    } else if($p &lt;= $p_high){
      $q = $p - 0.5; $r = $q * $q;
      $NormSInv = ((((($a1 * $r + $a2) * $r + $a3) * $r + $a4) * $r + $a5) * $r + $a6) * $q /
         ((((($b1 * $r + $b2) * $r + $b3) * $r + $b4) * $r + $b5) * $r + 1);
    } else {
      $q = pow(-2 * log(1 - $p), 2);
      $NormSInv = -((((($c1 * $q + $c2) * $q + $c3) * $q + $c4) * $q + $c5) * $q + $c6) /
         (((($d1 * $q + $d2) * $q + $d3) * $q + $d4) * $q + 1);
    }
    return $NormSInv;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://spechal.com/2009/11/15/php-function-to-emulate-excel-normsinv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
