Commit 286ead4
v01dxyz
Obsequi: Use ANSI C LCG instead of random() for g_zobrist init
musl implements random() differently than glibc.
The output of the program is thus dependent on this implementation
detail and could differ between platforms. To remediate that, we
replace it by a very simple PRNG (ANSI C LCG).
Warning: [^1] indicates this PRNG have quite a poor LSB randomness.
[^1]: Entacher, Karl. (1999). A Collection of Selected Pseudorandom
Number Generators With Linear Structures.
Fixes llvm/llvm-project#940481 parent b6d9197 commit 286ead4
File tree
2 files changed
+20
-15
lines changed- MultiSource/Applications/obsequi
2 files changed
+20
-15
lines changedLines changed: 13 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
| 165 | + | |
166 | 166 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
52 | 56 | | |
53 | 57 | | |
54 | 58 | | |
| |||
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
63 | | - | |
| 67 | + | |
64 | 68 | | |
65 | 69 | | |
66 | | - | |
| 70 | + | |
| 71 | + | |
67 | 72 | | |
68 | 73 | | |
69 | 74 | | |
| |||
0 commit comments