Thread: Re: [pgsql-hackers-win32] win32 random number generator

Re: [pgsql-hackers-win32] win32 random number generator

From
"Merlin Moncure"
Date:
> "Merlin Moncure" <merlin.moncure@rcsonline.com> writes:
> > Looks like this in lrand48(void):
    _rand48_seed[1] > 1);

> > _rand48_seed[1] >> 1);
                    ^^

The problem is the shift operator :).  Anyways I double checked the
results and it works as expected now so here's a patch.  I also removed
the spurious casts.

Merlin

Attachment

Re: [pgsql-hackers-win32] win32 random number generator

From
Tom Lane
Date:
"Merlin Moncure" <merlin.moncure@rcsonline.com> writes:
> "Merlin Moncure" <merlin.moncure@rcsonline.com> writes:
>> Looks like this in lrand48(void):
>>     _rand48_seed[1] > 1);

>>     _rand48_seed[1] >> 1);
>>                     ^^

> The problem is the shift operator :).

Ah, missed that completely in looking at the casts.  Will fix.

            regards, tom lane