summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c79cd27)
this is a minor fix to increase the period of the obsolete rand_r a bit.
an include header in __rand48_step.c is fixed as well.
uint64_t __rand48_step(unsigned short *xi, unsigned short *lc)
{
uint64_t __rand48_step(unsigned short *xi, unsigned short *lc)
{
int rand_r(unsigned *seed)
{
int rand_r(unsigned *seed)
{
- return (*seed = *seed * 1103515245 + 12345) & 0x7fffffff;
+ return (*seed = *seed * 1103515245 + 12345)/2;