"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 compiler manage not to choke if we add a cast instead? } while (!(z > 0 && z < (long) MAX_RANDOM_VALUE)); regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match