function getPRScore($mean, $sd, $x){
$z = ($x-$mean)/sqrt(2*$sd*$sd);
$t = 1/(1+0.3275911*abs($z));
$a1 = 0.254829592;
$a2 = -0.284496736;
$a3 = 1.421413741;
$a4 = -1.453152027;
$a5 = 1.061405429;
$erf = 1-((((($a5*$t + $a4)*$t) + $a3)*$t + $a2)*$t + $a1)*$t*exp(-$z*$z);
$sign = 1;
if($z < 0){
$sign = -1;
}
//累加分配乘上100等於PR值
$pr=(1/2)*(1+$sign*$erf)*100;
//PR值校正, 四捨五入取整數, PR介於1~99之間
$pr= round($pr, 0);
if($pr<=1)$pr=1;
if($pr>=99)$pr=99;
return $pr;
}
echo getPRScore(50, 10, 60);
Hi, just wanted to say, I liked this blog post. It was practical. Keep on posting!
throughout LANOne a period of time judging by going to be the way,for those times when I was learning how to deal with have to some coding gymnastics, I rent it out going to be the website I was working everywhere over the
i really appreciate your working style writing style of the article is really exceptional. lista de email lista de email lista de email lista de email lista de email
Hey found you a promo code: http://goo.gl/ZhVoa use BHS10OFF at checkout
en Irlande a
Hello very cool web site!! Guy .. Excellent .
. Wonderful .. I’ll bookmark your web site and take the feeds also? I’m
happy to search out a lot of useful info here in the post,
we need work out more strategies in this regard, thanks for sharing.
. . . . .