c/c++/c# 快速计算 Cumulative Normal Distribution 正态累积函数CDF
链接:
http://stackoverflow.com/questions/2328258/cumulative-normal-distribution-function-in-c-c
http://www.johndcook.com/blog/cpp_phi/
个人使用的是如下的代码:
static double CND(double d)
{
const double A1 = 0.31938153;
const double A2 = -0.356563782;
const double A3 = 1.781477937;
const double A4 = -1.821255978;
const double A5 = 1.330274429;
const double RSQRT2PI = 0.39894228040143267793994605993438;
double
K = 1.0 / (1.0 + 0.2316419 * fabs(d));
double
cnd = RSQRT2PI * exp(- 0.5 * d * d) *
(K * (A1 + K * (A2 + K * (A3 + K * (A4 + K * A5)))));
if (d > 0)
cnd = 1.0 - cnd;
return cnd;
}
此函数版权属于NVIDIA
c/c++/c# 快速计算 Cumulative Normal Distribution 正态累积函数CDF的更多相关文章
- 正态分布(Normal distribution)又名高斯分布(Gaussian distribution)
正态分布(Normal distribution)又名高斯分布(Gaussian distribution),是一个在数学.物理及project等领域都很重要的概率分布,在统计学的很多方面有着重大的影 ...
- Generalized normal distribution and Skew normal distribution
Density Function The Generalized Gaussian density has the following form: where (rho) is the " ...
- 基本概率分布Basic Concept of Probability Distributions 8: Normal Distribution
PDF version PDF & CDF The probability density function is $$f(x; \mu, \sigma) = {1\over\sqrt{2\p ...
- 截断正态分布(Truncated normal distribution)
Truncated normal distribution - Wikipedia Normal Distribution 称为正态分布,也称为高斯分布,Truncated Normal Distri ...
- Sql优化(二) 快速计算Distinct Count
原创文章,始发自本人个人博客站点,转载请务必注明出自http://www.jasongj.com 个人博客上本文链接http://www.jasongj.com/2015/03/15/count_di ...
- Paths on a Grid POJ - 1942 组合数学 (组合数的快速计算)
题意:格路问题 没什么难度 难点在于如何快速计算相对较大的组合数 思路:运用手写计算组合数的方式进行计算 如c(8,3) 如果手算就是 8*7*6/(3*2*1)这样可以很快得解出 计算代码为: ...
- [Swift通天遁地]五、高级扩展-(14)扩展String快速计算字符串中的各种数学表达式
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★➤微信公众号:山青咏芝(shanqingyongzhi)➤博客园地址:山青咏芝(https://www.cnblogs. ...
- 正态分布(normal distribution)与偏态分布(skewed distribution)
存在正太分布的概念,自然也少不了偏态分布. 正态分布(normal distribution) 偏态分布(skewed distribution) 左偏态:left skewed distributi ...
- 【瞎讲】 Cayley-Hamilton 常系数齐次线性递推式第n项的快速计算 (m=1e5,n=1e18)
[背诵瞎讲] Cayley-Hamilton 常系数齐次线性递推式第n项的快速计算 (m=1e5,n=1e18) 看CSP看到一题"线性递推式",不会做,去问了问zsy怎么做,他并 ...
随机推荐
- php/js/linux: js加密(rsa公钥加密) php解密(rsa私钥解密)
php/js/linux: js加密(rsa公钥加密) php解密(rsa私钥解密) 一: js rsa 插件 https://github.com/UFO0001/WX_RSA 或者: https: ...
- HTML5 学习记录——0
2015/08/19 HTML5的标签功能划分:基础.格式.表单.框架.图像.音视频.链接.列表.表格.样式.元信息.编程 1.HTML基础标题 <h1> - <h6>段落 & ...
- Android studio导入第三方类库源码以及jar包
新建一个Android项目,项目结构如下: 1.添加第三方类库源码 首先将第三方类库考入与app同级的目录下: 之后,在build.gradle(Moudule:app)下添加编译代码:在seting ...
- ES查看segment大小
摘自:http://www.aboutyun.com/thread-17078-1-1.html Segment Memory Segment不是file吗?segment memory又是什么?前面 ...
- hdu Digital Square(广搜)
题目:给出n,求出最小的m,满足m^2 % 10^k = n,其中k=0,1,2 http://acm.hdu.edu.cn/showproblem.php?pid=4394 只要有一个x满足条件便 ...
- ACM学习历程—HDU 5459 Jesus Is Here(递推)(2015沈阳网赛1010题)
Sample Input 9 5 6 7 8 113 1205 199312 199401 201314 Sample Output Case #1: 5 Case #2: 16 Case #3: 8 ...
- bzoj 2002: 弹飞绵羊 Link-Cut-Tree
题目: Description 某天,Lostmonkey发明了一种超级弹力装置,为了在他的绵羊朋友面前显摆,他邀请小绵羊一起玩个游戏.游戏一开始,Lostmonkey在地上沿着一条直线摆上n个装置, ...
- Oracle 12c 新特性之 PDB 级别闪回数据库
在Oracle Database 12.1中,闪回数据库操作仅限于 CDB ,Oracle Database 12.2支持 CDB 与 PDB 数据库的闪回. PDB 的还原点种类:1. normal ...
- 启动新内核出现:Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004
转载请注明出处:http://blog.csdn.net/qq_26093511/article/details/51841281 启动新内核出现错误:Kernel panic - not synci ...
- VC6.0 工程转到VS2010一些问题的描述及解决方法
下列为VC6.0 工程转到VS2008一些问题的描述及解决方法 //////////////////////////////////////////////////////////////////// ...