I always thought random numbers would lie between zero and one, without 1, i.e. they are numbers from the half-open interval [0,1). The documen
According to the standard, 1.0 is not valid.
C++11 §26.5.7.2 Function template generate_canonical
Each function instantiated from the template described in this section 26.5.7.2 maps the result of one or more invocations of a supplied uniform random number generator
gto one member of the specified RealType such that, if the values gi produced bygare uniformly distributed, the instantiation’s results tj , 0 ≤ tj < 1, are distributed as uniformly as possible as specified below.