random() 实际上是如何工作的? [英] how does random() actually work?

查看:41
本文介绍了random() 实际上是如何工作的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每种语言都有一个 random() 函数或类似的东西来生成伪随机数.我想知道下面会发生什么来生成这些数字?我没有编写任何需要这些知识的东西,只是想满足我自己的好奇心.

Every language has a random() function or something similar to generate a pseudo-random number. I am wondering what happens underneath to generate these numbers? I am not programming anything that makes this knowledge necessary, just trying to satisfy my own curiosity.

推荐答案

Donald Knuth 开创性的整个第一章作品 Seminumerical Algorithms 被用于这个主题随机数生成.我真的不认为 SO 答案会接近描述所涉及的问题.看书.

The entire first chapter of Donald Knuth's seminal work Seminumerical Algorithms is taken up with the subject of random number generation. I really don't think an SO answer is going to come close to describing the issues involved. Read the book.

这篇关于random() 实际上是如何工作的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆