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

查看:100
本文介绍了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开创性的整个第一章 符号算法涉及到该主题随机数生成.我真的不认为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天全站免登陆