摘要
C语言提供的随机函数类型单一,理论上是分布均匀的非负整数。系统介绍了把整型的随机函数转换为其他类型随机数的方法,详细介绍了运用高尔顿原理编写的转换函数,该函数把均匀分布的随机数加工为正态分布的随机数,并用图形展示了运行测试的结果。
The C language provides the random function type is unitary,theoretically is the distribution even nonnegative integer.This article system introduced transforms the trueing random function into other type random number method,introduced specially in detail the author utilizes the Galton principle compilation the transfer function,this function uniform distribution's random number processing for normal distribution's random number,and has demonstrated with the graph the movement test result.
出处
《电脑编程技巧与维护》
2010年第22期33-34,共2页
Computer Programming Skills & Maintenance
关键词
正态分布
随机函数
高尔顿板
Normal distribution
Random function
Galton board