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

Re: [HACKERS] random_fract and aix compiler bug

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To:
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] random_fract and aix compiler bug
Date: 2003-10-17 17:40:50
Message-ID: 3F9029A2.20207@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-patches
Tom Lane wrote:

>"Zeugswetter Andreas SB SD" <ZeugswetterA(at)spardat(dot)at> writes:
>
>! 	} while (!(z > 0 && z < MAX_RANDOM_VALUE));
>
>! 	} while (z == 0 || z == MAX_RANDOM_VALUE);
>
>This seems fairly ugly, since it eliminates the original coding's
>positive guarantee that the final result is in 0 < x < 1.  Does your
>compiler manage not to choke if we add a cast instead?
>
>	} while (!(z > 0 && z < (long) MAX_RANDOM_VALUE));
>
>  
>

Or put an "L" suffix on the value in pg_config_manual.h, so it gets 
picked up everywhere?

cheers

andrew


In response to

pgsql-patches by date

Next:From: Neil ConwayDate: 2003-10-17 20:50:03
Subject: Re: introduce "default_use_oids"
Previous:From: Tom LaneDate: 2003-10-17 17:17:40
Subject: Re: [HACKERS] random_fract and aix compiler bug

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