473,320 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

MSFT and random numbers

Anybody know whether MSFT has published the algorithm(s) used for the
following:

1. Randomize and Rnd in VB 6.
2. Randomize and Rnd in VB .NET
3. Random class in .NET.

--
http://www.standards.com/; See Howard Kaikow's web site.
Nov 20 '05 #1
7 1190
Howard,

* "Howard Kaikow" <ka****@standards.com> scripsit:
Anybody know whether MSFT has published the algorithm(s) used for the
following:

1. Randomize and Rnd in VB 6.
2. Randomize and Rnd in VB .NET
3. Random class in .NET.


I don't think so, but maybe you will find the implementation of the
latter here:

Shared Source CLI:

<http://msdn.microsoft.com/net/sscli/>
<http://msdn.microsoft.com/library/en-us/dndotnet/html/mssharsourcecli.asp>
<http://msdn.microsoft.com/library/en-us/dndotnet/html/mssharsourcecli2.asp>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
Howard,
3. Random class in .NET.
http://sharedsourcecli.sscli.net/sou...stem/random.cs

2. Randomize and Rnd in VB .NET
Not that I know, but you may be able to disassemble the VB library and
figure it out that way.

1. Randomize and Rnd in VB 6.


The VB.NET version is compatible with the VB6 version IIRC, so if you
get #2 you have this one as well.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 20 '05 #3
FYI - Randomize() and Rnd() are the same in VB 6.0 and VB.NET. In VB.NET
they are legacy functions.
"Howard Kaikow" <ka****@standards.com> wrote in message
news:eF****************@TK2MSFTNGP12.phx.gbl...
Anybody know whether MSFT has published the algorithm(s) used for the
following:

1. Randomize and Rnd in VB 6.
2. Randomize and Rnd in VB .NET
3. Random class in .NET.

--
http://www.standards.com/; See Howard Kaikow's web site.

Nov 20 '05 #4
Thanx, downloading as we speak.

--
http://www.standards.com/; See Howard Kaikow's web site.
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl...
Howard,

* "Howard Kaikow" <ka****@standards.com> scripsit:
Anybody know whether MSFT has published the algorithm(s) used for the
following:

1. Randomize and Rnd in VB 6.
2. Randomize and Rnd in VB .NET
3. Random class in .NET.
I don't think so, but maybe you will find the implementation of the
latter here:

Shared Source CLI:

<http://msdn.microsoft.com/net/sscli/>

<http://msdn.microsoft.com/library/en-us/dndotnet/html/mssharsourcecli.asp> <http://msdn.microsoft.com/library/en-us/dndotnet/html/mssharsourcecli2.asp>
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #5
THanx.

A number of folkes have raised questions about the quality of some of the
algorithms in Numerical Recipes in C, hope the random number algorithm is
not one of those.

There may be a paper on this at http://math.jpl.nasa.gov/nr/, but I cannot
seem to get to http://math.jpl.nasa.gov/ today.

--
http://www.standards.com/; See Howard Kaikow's web site.
"Mattias Sjögren" <ma********************@mvps.org> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
Howard,
3. Random class in .NET.

http://sharedsourcecli.sscli.net/sou...stem/random.cs
2. Randomize and Rnd in VB .NET


Not that I know, but you may be able to disassemble the VB library and
figure it out that way.

1. Randomize and Rnd in VB 6.


The VB.NET version is compatible with the VB6 version IIRC, so if you
get #2 you have this one as well.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Nov 20 '05 #6
Howard,
I vaguely remember something about Randomize & Rnd in MSDN Magazine or MSJ
magazine, however I don't have a specific link. Of course it may have been
VBPJ...

Of course this would have been from 3+ years ago, so I could be mistaken...

Hope this helps
Jay
"Howard Kaikow" <ka****@standards.com> wrote in message
news:eF****************@TK2MSFTNGP12.phx.gbl...
Anybody know whether MSFT has published the algorithm(s) used for the
following:

1. Randomize and Rnd in VB 6.
2. Randomize and Rnd in VB .NET
3. Random class in .NET.

--
http://www.standards.com/; See Howard Kaikow's web site.

Nov 20 '05 #7
Thanx.

It is probably a hopeless quest.

Even if I were to find the algorithms for both Rnd and Random, the
mathematics of trying to determine what seeds would be need to start both
with the same value might be daunting.

--
http://www.standards.com/; See Howard Kaikow's web site.
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
Howard,
I vaguely remember something about Randomize & Rnd in MSDN Magazine or MSJ
magazine, however I don't have a specific link. Of course it may have been
VBPJ...

Of course this would have been from 3+ years ago, so I could be mistaken...
Hope this helps
Jay
"Howard Kaikow" <ka****@standards.com> wrote in message
news:eF****************@TK2MSFTNGP12.phx.gbl...
Anybody know whether MSFT has published the algorithm(s) used for the
following:

1. Randomize and Rnd in VB 6.
2. Randomize and Rnd in VB .NET
3. Random class in .NET.

--
http://www.standards.com/; See Howard Kaikow's web site.


Nov 20 '05 #8

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

Similar topics

10
by: Nicholas Geraldi | last post by:
Im looking for a decent random number generator. Im looking to make a large number of random numbers (100 or so, if not more) in a short period of time (as fast as possible). the function i was...
21
by: Marc Dansereau | last post by:
Hi all I am new to this forum and to the c programming language. If I understand, the random() function in C return numbers that follow a uniform distribution U(0,1). Can somebody know how to...
5
by: cvnweb | last post by:
I am trying to generate 2 random numbers that are diffrent, in order to add them to existing numbers to generate numbers that start out the same, but are randomly added and subtracted so that they...
104
by: fieldfallow | last post by:
Hello all, Is there a function in the standard C library which returns a prime number which is also pseudo-random? Assuming there isn't, as it appears from the docs that I have, is there a...
12
by: Jim Michaels | last post by:
I need to generate 2 random numbers in rapid sequence from either PHP or mysql. I have not been able to do either. I get the same number back several times from PHP's mt_rand() and from mysql's...
21
by: chico_yallin | last post by:
I just wana make a random id number based on4 digits-for examples?? Thanks in Advance Ch.Yallin
13
by: Peter Oliphant | last post by:
I would like to be able to create a random number generator that produces evenly distributed random numbers up to given number. For example, I would like to pick a random number less than 100000,...
6
by: badcrusher10 | last post by:
Hello. I'm having trouble figuring out what to do and how to do.. could someone explain to me what I need to do in order to work? THIS IS WHAT I NEED TO DO: Professor Snoop wants a program...
24
by: pereges | last post by:
I need to generate two uniform random numbers between 0 and 1 in C ? How to do it ? I looked into rand function where you need to #define RAND_MAX as 1 but will this rand function give me ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.