Обсуждение: Re: [pgsql-hackers-win32] win32 random number generator

Поиск
Список
Период
Сортировка

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

От
"Merlin Moncure"
Дата:
> "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

Вложения

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

От
Tom Lane
Дата:
"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