http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56202



--- Comment #9 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-02-04 
18:01:52 UTC ---

You are right, but then I don't understand why we should compute __e *before*

checking __t == __x, per your first patch (I think I managed to confuse myself

exactly when I started wondering why...). Also __t == __x doesn't seem *so*

unlikely to me to warrant a __builtin_expect (we have very few of in general,

in the library). I think we could simply have:



        if (__t == __x)

          return __x;

        const double __e = -std::log(1.0 - __aurng());

        __sum += __e / (__t - __x);

        __x += 1;

Reply via email to