论坛: 公开讨论 (Thread #4435)

Welcome to Open Discussion (2004-02-12 16:36 by 匿名 #7875)

Welcome to Open Discussion

回复到 #7875×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

Re: Welcome to Open Discussion (2022-10-05 22:22 by 家鴨 #91820)

ファイル norminv.sl 内の関数

func stat_calnormsinv(x){
check1 = stat_checkisscalar(x);
check2 = stat_checkpvalue(x);

a1 = 1.570796288;
a2 = 0.03706987906;
a3 = -8.364353589 * 10^(-4);
a4 = -2.250947176 * 10^(-4);
a5 = 6.841218299 * 10^(-6);
a6 = 5.824238515 * 10^(-6);
a7 = -1.04527497 * 10^(-6);
a8 = 8.360937017 * 10^(-8);
a9 = -3.231081277 * 10^(-9);

y = - log(4 * x * (1 - x));
y = y * (a1 + y * (a2 + y * (a3 + y * (a4 + y * (a5 + y * (a6 + y * (a7 + y * (a8 + y * a9))))))));
ret = sqrt(y);

if(x > 0.5){
ret = -ret;
}

return ret;
}

の最後の所ですが、もしかして if ( x < 0.5 ) ではないでしょうか?
間違っていたらすいません。。。
回复到 #7875

回复到 #91820×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录