Re: [PATCHES] [HACKERS] random_fract and aix compiler bug

2003-10-18 Thread Tom Lane
"Zeugswetter Andreas SB SD" <[EMAIL PROTECTED]> writes: >> } while (z <= 0 || z >= MAX_RANDOM_VALUE); > Ah, yes ! That also works and is a lot nicer. Can you please apply ? Done. regards, tom lane ---(end of broadcast)--- T

Re: [PATCHES] [HACKERS] random_fract and aix compiler bug

2003-10-17 Thread Zeugswetter Andreas SB SD
> > Would we be happy with the following, which would work ? > > } while (z <= 0 || z == MAX_RANDOM_VALUE); > > I suppose this doesn't? > } while (z <= 0 || z >= MAX_RANDOM_VALUE); Ah, yes ! That also works and is a lot nicer. Can you please apply ? Together with the patch in

Re: [PATCHES] [HACKERS] random_fract and aix compiler bug

2003-10-17 Thread Tom Lane
"Zeugswetter Andreas SB SD" <[EMAIL PROTECTED]> writes: > Would we be happy with the following, which would work ? > } while (z <= 0 || z == MAX_RANDOM_VALUE); I suppose this doesn't? } while (z <= 0 || z >= MAX_RANDOM_VALUE); regards, tom lane -

Re: [PATCHES] [HACKERS] random_fract and aix compiler bug

2003-10-17 Thread Zeugswetter Andreas SB SD
> ! } 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 yes, ugly :-( > compiler manage not to choke if

Re: [PATCHES] [HACKERS] random_fract and aix compiler bug

2003-10-17 Thread Andrew Dunstan
Tom Lane wrote: "Zeugswetter Andreas SB SD" <[EMAIL PROTECTED]> 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

Re: [PATCHES] [HACKERS] random_fract and aix compiler bug

2003-10-17 Thread Tom Lane
"Zeugswetter Andreas SB SD" <[EMAIL PROTECTED]> 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 co