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

            Bug ID: 58098
           Summary: wrong return value of normal_distribution::min()
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: faithandbrave at gmail dot com

In <random>(bits/random.h)'s std::normal_distribution, min() function's
implementation is follow:

      /**
       * @brief Returns the greatest lower bound value of the distribution.
       */
      result_type
      min() const
      { return std::numeric_limits<result_type>::min(); }

It means return 0.0.
But, distributuon class's min() member function returns potentially return
value by operator().
I think should return numeric_limits::lowest() or -numeric_limits::infinity().

libc++ and Boost.Random's implementation returns -numeric_limits::infinity().

Reply via email to