473,749 Members | 2,402 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

64-bit Random Number Generator

Hello;
Does anyone know a 64-bit integer generator for 32-bit machines that
use long long or __int64 etc ?
Jun 27 '08 #1
4 14783
On Tue, 24 Jun 2008 04:32:42 -0700, Lexicon wrote:
Hello;
Does anyone know a 64-bit integer generator for 32-bit machines that use
long long or __int64 etc ?
You'll find a 64-bit version of the excellent (fast, very long period,
good statistical properties) Mersenne Twister generator at:

http://www.math.sci.hiroshima-u.ac.j.../MT/emt64.html

The basic word type is `unsigned long long', so if that's 64-bit on your
system it'll work; otherwise change it to whatever 64-bit (unsigned) type
your compiler supports.

It's also C code, but you can easily C++-isfy it if you want.

Cheers,

--
Lionel B
Jun 27 '08 #2
Lexicon wrote:
Hello;
Does anyone know a 64-bit integer generator for 32-bit machines that
use long long or __int64 etc ?
What's an integer generator?
Jun 27 '08 #3
On Tue, 24 Jun 2008 14:58:55 +0000, Juha Nieminen wrote:
Lexicon wrote:
>Hello;
Does anyone know a 64-bit integer generator for 32-bit machines that
use long long or __int64 etc ?

What's an integer generator?
Judging by the subject of the message, this would refer to a (pseudo-)
random number generator that generates integers (presumably uniformly)
random on a range of integers... as opposed, I guess, to a random number
generator that generates floating point numbers on a range of real
numbers.

--
Lionel B
Jun 27 '08 #4
On Jun 24, 6:09*pm, Lionel B <m...@privacy.n etwrote:
On Tue, 24 Jun 2008 14:58:55 +0000, Juha Nieminen wrote:
Lexicon wrote:
Hello;
Does anyone know a 64-bit integer generator for 32-bit machines that
use long long or __int64 etc ?
* What's an integer generator?

Judging by the subject of the message, this would refer to a (pseudo-)
random number generator that generates integers (presumably uniformly)
random on a range of integers... as opposed, I guess, to a random number
generator that generates floating point numbers on a range of real
numbers.

--
Lionel B
Yeah that was what i meant.
And Lionel, thank you very much for the Mersenne twister, i just
ported it to c++ and it works great.
Jun 27 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1539
by: Marc Poinot | last post by:
Did anybody use numarray on a 64 bits platform ? (e.g. SGI/Irix) The package works on our 64 bits platforms... using 32 bits mode, but not using 64 mode. Big crash in _ufunc... Is there a flag to set somewhere, trick, hint, noway ? -MP- ----------------------------------------------------------------------- Marc POINOT Alias: marcvs Email: poinot@onera.fr ONERA -MFE/DSNA/ELSA Tel: 01.46.73.42.84 Info:...
1
2053
by: Hugo | last post by:
I have a dual boot machine, runs Win XP pro and Win XP Pro 64, XP boots from C and XP 64 boots from D. They both have VS 2005 Beta 2 installed. I have a webapp developed in Win XP (32) which has gone well and runs fine in XP. I Now want to get this same app running under IIS on XP 64.
3
2255
by: Odd Bjørn Andersen | last post by:
I was asked to install db2 udb workgroup edition (version 7.2) 64-bits on AIX. But I cannot find that we have a CD with that software. Only Enterprise Edition. Is it correct that you have to install Enterprise (Server) Edition if you want 64-bits DB2 UDB (both version 7 and 8) on AIX ? And that Workgroup (Server) Edition doesn't come in 64-bits, only 32 ? -- Regards
0
1305
by: Hugo | last post by:
I have a dual boot machine, runs Win XP pro and Win XP Pro 64, Win XP boots from C and Win XP 64 boot from D. They both have VS 2005 Beta 2 installed. I have a webapp developed in Win XP (32) which has gone well and runs fine in XP. I Now want to get this same app running under IIS on XP 64.
3
15551
by: some one | last post by:
I have kind of wired problem, I using httpwebrequest to post form data to server , in the GetResponse stage a WebException occurred, after tracing the actual error that occurs on the server, I found the follows. Invalid length for a Base-64 char array. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about
1
2170
by: mel_apiso | last post by:
Hi, we have an AIX 5.3 OS, and we purchased DB2 UDB version 8 Workgroup Edition. We want to install 64 bits version, but the source CD's that we have say: WORKGROUP SERVER EDITION Version 8.1 for AIX 5L
13
4094
by: Mary Lei | last post by:
Does anyone know the link to obtain the tarball for db2 8.1 for solaris running on AMD 64 bit ? This is the entire db2 installation on a new system that does not have db2. Thanks.
10
10702
by: krunalb | last post by:
Hi, I am trying to shift unsigned long long value by 64 bits and this is what i get #include <stdio.h> int main() { unsigned short shiftby= 64;
1
2373
by: =?Utf-8?B?UGF1bCBQaGlsbGlwcw==?= | last post by:
I have read many things about this but I haven't got a clear vision on what to do if anything about this. I have a system that tries to find holes in my web site. One of the things it has found and has been sent to me is an Invalid_Viewstate exception. I will provide the stack trace below. If you read down the stack trace it talks about "Invalid chararcter in a base-64
2
1789
by: James | last post by:
What's the difference between DB2V8 32-bits and 64-bits instance on AIX? and I am confused the relationship between DB2 32/64-bits instance and 32/64-bits AIX? Maybe it is a simple question. Please advise. Thanks so much.
0
8996
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8832
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9566
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9254
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6800
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4608
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.