![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
How good is the rand function of MySQL? How can it be improved? Thx. -- When you argue with a fool, chances are he's doing the same |
#3
| |||
| |||
|
|
How good is the rand function of MySQL? How can it be improved? Thx. -- When you argue with a fool, chances are he's doing the same |
#4
| |||
| |||
|
|
How good is the rand function of MySQL? How can it be improved? Thx. -- When you argue with a fool, chances are he's doing the same |
#5
| |||
| |||
|
|
Cosmic programmer wrote: How good is the rand function of MySQL? How can it be improved? Thx. -- When you argue with a fool, chances are he's doing the same It's as good as pretty much any pseudo-random number generator. Why do you think it needs to be improved? -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex (AT) attglobal (DOT) net ================== |
#6
| |||
| |||
|
|
Cosmic programmer wrote: How good is the rand function of MySQL? How can it be improved? Thx. -- When you argue with a fool, chances are he's doing the same It's as good as pretty much any pseudo-random number generator. Why do you think it needs to be improved? |
#7
| |||
| |||
|
|
"Jerry Stuckle" <jstucklex (AT) attglobal (DOT) net> wrote in message news:n8GdnZSDT8M7gIrVnZ2dnUVZ_vKdnZ2d (AT) comcast (DOT) com... Cosmic programmer wrote: How good is the rand function of MySQL? How can it be improved? Thx. -- When you argue with a fool, chances are he's doing the same It's as good as pretty much any pseudo-random number generator. Why do you think it needs to be improved? -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex (AT) attglobal (DOT) net ================== I remember an older version had issues with generating the same random number sequences when called from identical code routines. The solution was to add a random seed from the language your using to shuffle the pack first, so to speak. |
#8
| |||
| |||
|
|
In message <n8GdnZSDT8M7gIrVnZ2dnUVZ_vKdnZ2d (AT) comcast (DOT) com>, Jerry Stuckle jstucklex (AT) attglobal (DOT) net> writes Cosmic programmer wrote: How good is the rand function of MySQL? How can it be improved? Thx. -- When you argue with a fool, chances are he's doing the same It's as good as pretty much any pseudo-random number generator. Why do you think it needs to be improved? If it's only as good as any pseudo-random number generator, it definitely needs to be improved. Nick |
#9
| |||
| |||
|
|
Nick Wedd wrote: In message <n8GdnZSDT8M7gIrVnZ2dnUVZ_vKdnZ2d (AT) comcast (DOT) com>, Jerry Stuckle <jstucklex (AT) attglobal (DOT) net> writes Cosmic programmer wrote: How good is the rand function of MySQL? How can it be improved? Thx. -- When you argue with a fool, chances are he's doing the same It's as good as pretty much any pseudo-random number generator. Why do you think it needs to be improved? If it's only as good as any pseudo-random number generator, it definitely needs to be improved. Nick And exactly how would you do that? Most pseudo-random number generators are pretty good, IMHO. And there is no such thing as a true random number generator. |
#10
| |||
| |||
|
|
In message <69qdnTw3ffk8Z4TVnZ2dnUVZ_qfinZ2d (AT) comcast (DOT) com>, Jerry Stuckle jstucklex (AT) attglobal (DOT) net> writes Nick Wedd wrote: In message <n8GdnZSDT8M7gIrVnZ2dnUVZ_vKdnZ2d (AT) comcast (DOT) com>, Jerry Stuckle <jstucklex (AT) attglobal (DOT) net> writes Cosmic programmer wrote: How good is the rand function of MySQL? How can it be improved? Thx. -- When you argue with a fool, chances are he's doing the same It's as good as pretty much any pseudo-random number generator. Why do you think it needs to be improved? If it's only as good as any pseudo-random number generator, it definitely needs to be improved. Nick And exactly how would you do that? Most pseudo-random number generators are pretty good, IMHO. And there is no such thing as a true random number generator. Knuth's "Numerical recipes in C" explains what can be wrong with system-supplied rand() functions. He wrote it 20 years ago, and things must have improved since then; but I still wouldn't trust a system-supplied rand(). He gives code for improving a system rand(), also for replacing it by one known to be good. His code is in C of course, but is quite short and is easily translated into other languages. Nick |
![]() |
| Thread Tools | |
| Display Modes | |
| |