如何在C ++中制作Xorshift代码 [英] How to make Xorshift code in C++

查看:135
本文介绍了如何在C ++中制作Xorshift代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

i有一个问题,我必须通过xorshift操作产生49的抽奖6的随机数,我不知道这个操作如何工作,怎么可以实现,所以任何帮忙?

Hello,
i have a problem where i have to produce random numbers for lottery 6 of 49 by the xorshift operation and i have no idea how this operation works and how could it be realized, so any help?

推荐答案

谷歌是你的朋友:好好经常拜访他。他可以比在这里发布问题更快地回答问题...



非常快速的搜索给出了13,000次点击:GoogleXorshift操作 [ ^ ]

第二次点击是维基百科 [ ^ 使用C语言中的示例代码,它将在C ++中运行!



将来,请尝试自己做至少基础研究,不要浪费你的时间或我们的。
Google is your friend: Be nice and visit him often. He can answer questions a lot more quickly than posting them here...

A very quick search gave 13,000 hits: Google "Xorshift operation"[^]
The second hit is Wikipedia[^] with example code in C which will work in C++!

In future, please try to do at least basic research yourself, and not waste your time or ours.


这篇关于如何在C ++中制作Xorshift代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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