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

Section: 29.6.7.2 [rand.util.canonical] Status: NAD Submitter: Stephan Tolksdorf Opened: 2007-09-21 Last modified: 2016-02-10

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.