设计了一种新的正态分布随机数抽样算法,并给出了其C语言实现。该算法基于接受—拒绝抽样技术,理论分析表明当矩形数大于255个时,该算法的抽样效率大于99.1%,而且98%以上的时间内仅需进行一次简单的乘法运算。数字试验及统计检验表明该算法的抽样效率远远高于目前常用的算法,而且所产生的正态随机变量具有很好的统计特性.
Efficient normal random variables generator was designed. The portable computer code in C language was proposed. This generator is based on acceptance-rejection technique, however, in theory, when the number of rectangle preponderates over 255, the acceptance probability is higher than 99.1%, with 98% of the time the required random variable is produced simply by doing a multiplication. Numerical experiments and statistical testes show that the proposed generator is much faster than those widely used ones and the sampled random variables have good statistical property.