Skip to content

随机数发生器 随机数函数 随机数 产生随机数(线性同余法)random randint Random number generator Random number function

Notifications You must be signed in to change notification settings

BitArtificial/random

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

random

随机数函数(线性同余法)random randint

随机数函数 纯手写的 使用的是线性同余法(自己百度去),随机数函数使用的递归 觉得有用给个小星星哦

第二个是测试函数,经过多次测试,发现前半区间(0.2,0.4)的频率每次都比较高,或许这是因为我a,b,m的值都比较大,因此从产生的整数里获取前几位作为小数的分布就不够随机了,当然后面或许会改进一下。

测试代码参考的是:https://blog.csdn.net/hohaizx/article/details/79101322 ,我之前还没用用过matplotlib画图,啊,周五还要交PHP的论文,不低于5000字啊,写个狗屁哦!

image

About

随机数发生器 随机数函数 随机数 产生随机数(线性同余法)random randint Random number generator Random number function

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages