Skip site navigation (1) Skip section navigation (2)

Re: win32 random number generator

From: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-patches(at)postgresql(dot)org>,<pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: win32 random number generator
Date: 2005-08-23 12:14:21
Message-ID: 6EE64EF3AB31D5448D0007DD34EEB3417DD177@Herge.rcsinc.local (view raw or flat)
Thread:
Lists: pgsql-hackers-win32pgsql-patches
> "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)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: fix_random.diff
Description: application/octet-stream (353 bytes)

Responses

pgsql-patches by date

Next:From: Andrew DunstanDate: 2005-08-23 12:53:38
Subject: Re: PL/Perl embedding string common elements
Previous:From: Magnus HaganderDate: 2005-08-23 10:28:35
Subject: Re: Win32 unicode vs ICU

pgsql-hackers-win32 by date

Next:From: Tom LaneDate: 2005-08-23 13:26:16
Subject: Re: win32 random number generator
Previous:From: Claudio NatoliDate: 2005-08-23 05:13:42
Subject: Re: win32 random number generator

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group