This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of NAD status.

739. Defect in [rand.util.canonical]/3

Section: 29.5.8.2 [rand.util.canonical] Status: NAD Submitter: Stephan Tolksdorf Opened: 2007-09-21 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [rand.util.canonical].

View all issues with NAD status.

Discussion:

The complexity of generate_canonical is specified to be "exactly k=max(1, ceil(b/log2 R)) invocations of g". This terms involves a logarithm that is not rounded and hence can not (in general) be computed at compile time. As this function template is performance critical, I propose to replace ceil(b/log2 R) with ceil(b/floor(log2 R)).

See N2424 for further discussion.

[ Bellevue: ]

In N2424. Close NAD as described there.

Proposed resolution:

See N2424 for the proposed resolution.