Overview
| Artifact ID: | 169e6209f30a62be226547dd5c4d6524597ad10a |
|---|---|
| Ticket: | 402781ffffffffffffffffffffffffffffffffff
Fix for Bug 121072 |
| User & Date: | dgp on 2000-12-13 08:53:17 |
Changes
- icomment:
Even without a convincing case that some compilers are broken, it is evident that they vary, so we need an implementation that works with them all. A 64-bit world would be a great reason, some day, to replace Tcl's "minimally acceptable" [*] rand() with a better one. For now, I'm satisfied with fixing this one. Besides, anyone doing serious statistics is, I hope, wise enough to know that Tcl's rand() is not up to the task. They should be producing and using extensions specialized for that purpose. There is a very minor (IMHO) incompatibility introduced by this patch. [expr srand($seed)] is used to initialize the random number generator so by using the same seed again and again, the programmer can generate the same pseudo-random sequence again and again. After this patch is applied, on those 64-bit platforms where Bug 121072 did not exhibit, and for values of $seed >= 2^31, the sequence generated after [expr srand($seed)] in Tcl 8.4 will not be the same sequence as was generated by the same $seed in Tcl 8.3. For other platforms, or values of $seed less than 2^31 on all platforms, the $seed -> sequence map should be unchanged. Without objection, I'll integrate on Dec. 14, 2000. [*] Press & Teukolsky
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"