I posted on the Bugzilla. Basically, Howard's proposed patch anticipates that DR2168 will be resolved in some way that still allows uniform_real_distribution(x,x)() to have undefined behavior. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3893.html#2168
I have no inside information, but naively it seems obvious to me that DR2168 is more likely to be resolved by making libc++'s *current* implementation conforming (by fixing the <-for-≤ typo), at which point no patch will be necessary at all. –Arthur On Tue, Feb 11, 2014 at 12:34 PM, Howard Hinnant <[email protected]> wrote: > http://llvm.org/bugs/show_bug.cgi?id=18767 > > This is a fix & test for this bug in uniform_real_distribution. I believe > the bug is simply due to roundoff error, and the way to fix it is to iterate > until the roundoff does not happen. > > > In the test case, which is an extreme, there are about 2.6 iterations / call. > In a more realistic scenario, such as defaulting the range to [0, 1), there > is only 1 iteration / call (as before this fix). > > Howard > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits > _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
