A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://timsong-cpp.github.io/cppwp/n4659/rand.req.urng below:

[rand.req.urng]

29 Numerics library [numerics] 29.6 Random number generation [rand] 29.6.1 Requirements [rand.req] 29.6.1.3 Uniform random bit generator requirements [rand.req.urng]

A uniform random bit generator g of type G is a function object returning unsigned integer values such that each value in the range of possible results has (ideally) equal probability of being returned. [Note: The degree to which g's results approximate the ideal is often determined statistically. end note]

A class G satisfies the requirements of a uniform random bit generator if the expressions shown in Table 103 are valid and have the indicated semantics, and if G also satisfies all other requirements of this section [rand.req.urng]. In that Table and throughout this section:

  1. a)T is the type named by G's associated result_­type, and

  2. b)g is a value of G.

Table

103

— Uniform random bit generator requirements


Expression Return type Pre/post-condition Complexity G​::​result_­type T T is an unsigned integer type. compile-time g() T Returns a value in the closed interval [G​::​min(), G​::​max()]. amortized constant G​::​min() T Denotes the least value potentially returned by operator(). compile-time G​::​max() T Denotes the greatest value potentially returned by operator(). compile-time

The following relation shall hold: G​::​min() < G​::​max().


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4