> ! } 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 we add a cast instead? > > } while (!(z > 0 && z < (long) MAX_RANDOM_VALUE)); > this does unfortunately not help, have also tried all sorts of other casts :-( Would we be happy with the following, which would work ? } while (z <= 0 || z == MAX_RANDOM_VALUE); Andreas ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly