+2013-08-07 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR libstdc++/58098
+ * include/bits/random.h (cauchy_distribution<>::min,
+ extreme_value_distribution<>::min, normal_distribution<>::min,
+ student_t_distribution<>::min): Fix.
+ * include/ext/random (normal_mv_distribution<>::min): Likewise.
+ * testsuite/26_numerics/random/cauchy_distribution/cons/parms.cc:
+ Adjust.
+ testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
+ Likewise.
+ * testsuite/26_numerics/random/extreme_value_distribution/cons/
+ parms.cc: Likewise.
+ testsuite/26_numerics/random/extreme_value_distribution/cons/
+ default.cc: Likewise.
+ * testsuite/26_numerics/random/normal_distribution/cons/parms.cc:
+ Likewise.
+ * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
+ Likewise.
+ * testsuite/26_numerics/random/student_t_distribution/cons/parms.cc:
+ Likewise.
+ * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
+ Likewise.
+ * testsuite/ext/random/normal_mv_distribution/cons/parms.cc: Likewise.
+ * testsuite/ext/random/normal_mv_distribution/cons/default.cc: Likewise.
+
+ * testsuite/26_numerics/random/exponential_distribution/cons/parms.cc:
+ Minor tweak.
+ * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
+ Likewise.
+
+ * testsuite/ext/von_mises_distribution/*: Move to...
+ * testsuite/ext/random/von_mises_distribution/*: ... here.
+ * testsuite/ext/triangular_distribution/*: Move to...
+ * testsuite/ext/random/triangular_distribution/*: ... here.
+
2013-08-06 Caroline Tice <cmtice@google.com>
* fragment.am: Add XTEMPLATE_FLAGS.
*/
result_type
min() const
- { return std::numeric_limits<result_type>::min(); }
+ { return std::numeric_limits<result_type>::lowest(); }
/**
* @brief Returns the least upper bound value of the distribution.
*/
result_type
min() const
- { return std::numeric_limits<result_type>::min(); }
+ { return std::numeric_limits<result_type>::lowest(); }
/**
* @brief Returns the least upper bound value of the distribution.
*/
result_type
min() const
- { return std::numeric_limits<result_type>::min(); }
+ { return std::numeric_limits<result_type>::lowest(); }
/**
* @brief Returns the least upper bound value of the distribution.
*/
result_type
min() const
- { return std::numeric_limits<result_type>::min(); }
+ { return std::numeric_limits<result_type>::lowest(); }
/**
* @brief Returns the least upper bound value of the distribution.
result_type
min() const
{ result_type __res;
- __res.fill(std::numeric_limits<_RealType>::min());
+ __res.fill(std::numeric_limits<_RealType>::lowest());
return __res; }
/**
VERIFY( u.a() == 0.0 );
VERIFY( u.b() == 1.0 );
typedef std::cauchy_distribution<>::result_type result_type;
- VERIFY( u.min() == std::numeric_limits<result_type>::min() );
+ VERIFY( u.min() == std::numeric_limits<result_type>::lowest() );
VERIFY( u.max() == std::numeric_limits<result_type>::max() );
}
VERIFY( u.a() == 5.0 );
VERIFY( u.b() == 2.0 );
typedef std::cauchy_distribution<>::result_type result_type;
- VERIFY( u.min() == std::numeric_limits<result_type>::min() );
+ VERIFY( u.min() == std::numeric_limits<result_type>::lowest() );
VERIFY( u.max() == std::numeric_limits<result_type>::max() );
}
std::exponential_distribution<> u;
VERIFY( u.lambda() == 1.0 );
typedef std::exponential_distribution<>::result_type result_type;
- VERIFY( u.min() == 0 );
+ VERIFY( u.min() == 0.0 );
VERIFY( u.max() == std::numeric_limits<result_type>::max() );
}
std::exponential_distribution<> u(0.5);
VERIFY( u.lambda() == 0.5 );
typedef std::exponential_distribution<>::result_type result_type;
- VERIFY( u.min() == 0 );
+ VERIFY( u.min() == 0.0 );
VERIFY( u.max() == std::numeric_limits<result_type>::max() );
}
VERIFY( u.a() == 0.0 );
VERIFY( u.b() == 1.0 );
typedef std::extreme_value_distribution<>::result_type result_type;
- VERIFY( u.min() == std::numeric_limits<result_type>::min() );
+ VERIFY( u.min() == std::numeric_limits<result_type>::lowest() );
VERIFY( u.max() == std::numeric_limits<result_type>::max() );
}
VERIFY( u.a() == 5.0 );
VERIFY( u.b() == 2.0 );
typedef std::extreme_value_distribution<>::result_type result_type;
- VERIFY( u.min() == std::numeric_limits<result_type>::min() );
+ VERIFY( u.min() == std::numeric_limits<result_type>::lowest() );
VERIFY( u.max() == std::numeric_limits<result_type>::max() );
}
VERIFY( u.mean() == 0.0 );
VERIFY( u.stddev() == 1.0 );
typedef std::normal_distribution<>::result_type result_type;
- VERIFY( u.min() == std::numeric_limits<result_type>::min() );
+ VERIFY( u.min() == std::numeric_limits<result_type>::lowest() );
VERIFY( u.max() == std::numeric_limits<result_type>::max() );
}
VERIFY( u.mean() == 5.0 );
VERIFY( u.stddev() == 2.0 );
typedef std::normal_distribution<>::result_type result_type;
- VERIFY( u.min() == std::numeric_limits<result_type>::min() );
+ VERIFY( u.min() == std::numeric_limits<result_type>::lowest() );
VERIFY( u.max() == std::numeric_limits<result_type>::max() );
}
std::student_t_distribution<> u;
VERIFY( u.n() == 1.0 );
typedef std::student_t_distribution<>::result_type result_type;
- VERIFY( u.min() == std::numeric_limits<result_type>::min() );
+ VERIFY( u.min() == std::numeric_limits<result_type>::lowest() );
VERIFY( u.max() == std::numeric_limits<result_type>::max() );
}
std::student_t_distribution<> u(1.5);
VERIFY( u.n() == 1.5 );
typedef std::student_t_distribution<>::result_type result_type;
- VERIFY( u.min() == std::numeric_limits<result_type>::min() );
+ VERIFY( u.min() == std::numeric_limits<result_type>::lowest() );
VERIFY( u.max() == std::numeric_limits<result_type>::max() );
}
VERIFY( u.varcov()[1] == 0.0 );
VERIFY( u.varcov()[2] == 1.0 );
typedef __gnu_cxx::normal_mv_distribution<2>::result_type result_type;
- VERIFY( u.min()[0] == std::numeric_limits<result_type::value_type>::min() );
+ VERIFY( u.min()[0] == std::numeric_limits<result_type::value_type>::lowest() );
VERIFY( u.max()[0] == std::numeric_limits<result_type::value_type>::max() );
- VERIFY( u.min()[1] == std::numeric_limits<result_type::value_type>::min() );
+ VERIFY( u.min()[1] == std::numeric_limits<result_type::value_type>::lowest() );
VERIFY( u.max()[1] == std::numeric_limits<result_type::value_type>::max() );
}
VERIFY( u.varcov()[1] == 0.0 );
VERIFY( u.varcov()[2] == 3.0 );
typedef __gnu_cxx::normal_mv_distribution<2>::result_type result_type;
- VERIFY( u.min()[0] == std::numeric_limits<result_type::value_type>::min() );
+ VERIFY( u.min()[0] == std::numeric_limits<result_type::value_type>::lowest() );
VERIFY( u.max()[0] == std::numeric_limits<result_type::value_type>::max() );
- VERIFY( u.min()[1] == std::numeric_limits<result_type::value_type>::min() );
+ VERIFY( u.min()[1] == std::numeric_limits<result_type::value_type>::lowest() );
VERIFY( u.max()[1] == std::numeric_limits<result_type::value_type>::max() );
}
--- /dev/null
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net>
+// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
+//
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ __gnu_cxx::triangular_distribution<> u;
+ VERIFY( u.a() == 0.0 );
+ VERIFY( u.b() == 0.5 );
+ VERIFY( u.c() == 1.0 );
+ VERIFY( u.min() == 0.0 );
+ VERIFY( u.max() == 1.0 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net>
+// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
+//
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ __gnu_cxx::triangular_distribution<> u(1.5, 3.0, 3.5);
+ VERIFY( u.a() == 1.5 );
+ VERIFY( u.b() == 3.0 );
+ VERIFY( u.c() == 3.5 );
+ VERIFY( u.min() == 1.5 );
+ VERIFY( u.max() == 3.5 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16 Paolo Carlini <paolo.carlini@oracle.com>
+// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
+//
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ __gnu_cxx::triangular_distribution<double> u(1.5, 3.0, 4.0), v, w;
+
+ VERIFY( v == w );
+ VERIFY( !(u == v) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16 Paolo Carlini <paolo.carlini@oracle.com>
+// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
+//
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ __gnu_cxx::triangular_distribution<double> u(1.5, 3.0, 5.0), v, w;
+
+ VERIFY( u != v );
+ VERIFY( !(v != w) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2009-08-14 Edward M. Smith-Rowland <3dw4rd@verizon.net>
+// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
+//
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/random>
+#include <sstream>
+
+void
+test01()
+{
+ std::stringstream str;
+ __gnu_cxx::triangular_distribution<double> u(1.5, 3.0, 4.5), v;
+ std::minstd_rand0 rng;
+
+ u(rng); // advance
+ str << u;
+
+ str >> v;
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// { dg-options "-std=c++11" }
+// { dg-require-cstdint "" }
+//
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/random>
+
+template class __gnu_cxx::triangular_distribution<float>;
+template class __gnu_cxx::triangular_distribution<double>;
+template class __gnu_cxx::triangular_distribution<long double>;
--- /dev/null
+// { dg-do compile }
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net>
+// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
+//
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/random>
+
+void
+test01()
+{
+ typedef __gnu_cxx::triangular_distribution<double> test_type;
+
+ typedef test_type::result_type result_type;
+ typedef test_type::param_type param_type;
+}
--- /dev/null
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net>
+// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
+//
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ __gnu_cxx::von_mises_distribution<> u;
+ VERIFY( u.mu() == 0.0 );
+ VERIFY( u.kappa() == 1.0 );
+ VERIFY( u.min() == -__gnu_cxx::__math_constants<double>::__pi );
+ VERIFY( u.max() == __gnu_cxx::__math_constants<double>::__pi );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net>
+// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
+//
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ __gnu_cxx::von_mises_distribution<> u(1.5, 3.0);
+ VERIFY( u.mu() == 1.5 );
+ VERIFY( u.kappa() == 3.0 );
+ VERIFY( u.min() == -__gnu_cxx::__math_constants<double>::__pi );
+ VERIFY( u.max() == __gnu_cxx::__math_constants<double>::__pi );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16 Paolo Carlini <paolo.carlini@oracle.com>
+// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
+//
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ __gnu_cxx::von_mises_distribution<double> u(1.5, 3.0), v, w;
+
+ VERIFY( v == w );
+ VERIFY( !(u == v) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16 Paolo Carlini <paolo.carlini@oracle.com>
+// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
+//
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ __gnu_cxx::von_mises_distribution<double> u(1.5, 3.0), v, w;
+
+ VERIFY( u != v );
+ VERIFY( !(v != w) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2009-08-14 Edward M. Smith-Rowland <3dw4rd@verizon.net>
+// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
+//
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/random>
+#include <sstream>
+
+void
+test01()
+{
+ std::stringstream str;
+ __gnu_cxx::von_mises_distribution<double> u(1.5, 3.0), v;
+ std::minstd_rand0 rng;
+
+ u(rng); // advance
+ str << u;
+
+ str >> v;
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// { dg-options "-std=c++11" }
+// { dg-require-cstdint "" }
+//
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/random>
+
+template class __gnu_cxx::von_mises_distribution<float>;
+template class __gnu_cxx::von_mises_distribution<double>;
+template class __gnu_cxx::von_mises_distribution<long double>;
--- /dev/null
+// { dg-do compile }
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net>
+// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
+//
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <ext/random>
+
+void
+test01()
+{
+ typedef __gnu_cxx::von_mises_distribution<double> test_type;
+
+ typedef test_type::result_type result_type;
+ typedef test_type::param_type param_type;
+}
+++ /dev/null
-// { dg-options "-std=c++0x" }
-// { dg-require-cstdint "" }
-//
-// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net>
-// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
-//
-// Copyright (C) 2013 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3. If not see
-// <http://www.gnu.org/licenses/>.
-
-#include <ext/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- bool test __attribute__((unused)) = true;
-
- __gnu_cxx::triangular_distribution<> u;
- VERIFY( u.a() == 0.0 );
- VERIFY( u.b() == 0.5 );
- VERIFY( u.c() == 1.0 );
- VERIFY( u.min() == 0.0 );
- VERIFY( u.max() == 1.0 );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// { dg-options "-std=c++0x" }
-// { dg-require-cstdint "" }
-//
-// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net>
-// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
-//
-// Copyright (C) 2013 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3. If not see
-// <http://www.gnu.org/licenses/>.
-
-#include <ext/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- bool test __attribute__((unused)) = true;
-
- __gnu_cxx::triangular_distribution<> u(1.5, 3.0, 3.5);
- VERIFY( u.a() == 1.5 );
- VERIFY( u.b() == 3.0 );
- VERIFY( u.c() == 3.5 );
- VERIFY( u.min() == 1.5 );
- VERIFY( u.max() == 3.5 );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// { dg-options "-std=c++0x" }
-// { dg-require-cstdint "" }
-//
-// 2010-03-16 Paolo Carlini <paolo.carlini@oracle.com>
-// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
-//
-// Copyright (C) 2013 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3. If not see
-// <http://www.gnu.org/licenses/>.
-
-#include <ext/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- bool test __attribute__((unused)) = true;
-
- __gnu_cxx::triangular_distribution<double> u(1.5, 3.0, 4.0), v, w;
-
- VERIFY( v == w );
- VERIFY( !(u == v) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// { dg-options "-std=c++0x" }
-// { dg-require-cstdint "" }
-//
-// 2010-03-16 Paolo Carlini <paolo.carlini@oracle.com>
-// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
-//
-// Copyright (C) 2013 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3. If not see
-// <http://www.gnu.org/licenses/>.
-
-#include <ext/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- bool test __attribute__((unused)) = true;
-
- __gnu_cxx::triangular_distribution<double> u(1.5, 3.0, 5.0), v, w;
-
- VERIFY( u != v );
- VERIFY( !(v != w) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// { dg-options "-std=c++0x" }
-// { dg-require-cstdint "" }
-//
-// 2009-08-14 Edward M. Smith-Rowland <3dw4rd@verizon.net>
-// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
-//
-// Copyright (C) 2013 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3. If not see
-// <http://www.gnu.org/licenses/>.
-
-#include <ext/random>
-#include <sstream>
-
-void
-test01()
-{
- std::stringstream str;
- __gnu_cxx::triangular_distribution<double> u(1.5, 3.0, 4.5), v;
- std::minstd_rand0 rng;
-
- u(rng); // advance
- str << u;
-
- str >> v;
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// { dg-do compile }
-// { dg-options "-std=c++11" }
-// { dg-require-cstdint "" }
-//
-// Copyright (C) 2013 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3. If not see
-// <http://www.gnu.org/licenses/>.
-
-#include <ext/random>
-
-template class __gnu_cxx::triangular_distribution<float>;
-template class __gnu_cxx::triangular_distribution<double>;
-template class __gnu_cxx::triangular_distribution<long double>;
+++ /dev/null
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
-// { dg-require-cstdint "" }
-//
-// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net>
-// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
-//
-// Copyright (C) 2013 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3. If not see
-// <http://www.gnu.org/licenses/>.
-
-#include <ext/random>
-
-void
-test01()
-{
- typedef __gnu_cxx::triangular_distribution<double> test_type;
-
- typedef test_type::result_type result_type;
- typedef test_type::param_type param_type;
-}
+++ /dev/null
-// { dg-options "-std=c++0x" }
-// { dg-require-cstdint "" }
-//
-// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net>
-// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
-//
-// Copyright (C) 2013 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3. If not see
-// <http://www.gnu.org/licenses/>.
-
-#include <ext/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- bool test __attribute__((unused)) = true;
-
- __gnu_cxx::von_mises_distribution<> u;
- VERIFY( u.mu() == 0.0 );
- VERIFY( u.kappa() == 1.0 );
- VERIFY( u.min() == -__gnu_cxx::__math_constants<double>::__pi );
- VERIFY( u.max() == __gnu_cxx::__math_constants<double>::__pi );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// { dg-options "-std=c++0x" }
-// { dg-require-cstdint "" }
-//
-// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net>
-// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
-//
-// Copyright (C) 2013 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3. If not see
-// <http://www.gnu.org/licenses/>.
-
-#include <ext/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- bool test __attribute__((unused)) = true;
-
- __gnu_cxx::von_mises_distribution<> u(1.5, 3.0);
- VERIFY( u.mu() == 1.5 );
- VERIFY( u.kappa() == 3.0 );
- VERIFY( u.min() == -__gnu_cxx::__math_constants<double>::__pi );
- VERIFY( u.max() == __gnu_cxx::__math_constants<double>::__pi );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// { dg-options "-std=c++0x" }
-// { dg-require-cstdint "" }
-//
-// 2010-03-16 Paolo Carlini <paolo.carlini@oracle.com>
-// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
-//
-// Copyright (C) 2013 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3. If not see
-// <http://www.gnu.org/licenses/>.
-
-#include <ext/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- bool test __attribute__((unused)) = true;
-
- __gnu_cxx::von_mises_distribution<double> u(1.5, 3.0), v, w;
-
- VERIFY( v == w );
- VERIFY( !(u == v) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// { dg-options "-std=c++0x" }
-// { dg-require-cstdint "" }
-//
-// 2010-03-16 Paolo Carlini <paolo.carlini@oracle.com>
-// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
-//
-// Copyright (C) 2013 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3. If not see
-// <http://www.gnu.org/licenses/>.
-
-#include <ext/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- bool test __attribute__((unused)) = true;
-
- __gnu_cxx::von_mises_distribution<double> u(1.5, 3.0), v, w;
-
- VERIFY( u != v );
- VERIFY( !(v != w) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// { dg-options "-std=c++0x" }
-// { dg-require-cstdint "" }
-//
-// 2009-08-14 Edward M. Smith-Rowland <3dw4rd@verizon.net>
-// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
-//
-// Copyright (C) 2013 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3. If not see
-// <http://www.gnu.org/licenses/>.
-
-#include <ext/random>
-#include <sstream>
-
-void
-test01()
-{
- std::stringstream str;
- __gnu_cxx::von_mises_distribution<double> u(1.5, 3.0), v;
- std::minstd_rand0 rng;
-
- u(rng); // advance
- str << u;
-
- str >> v;
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// { dg-do compile }
-// { dg-options "-std=c++11" }
-// { dg-require-cstdint "" }
-//
-// Copyright (C) 2013 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3. If not see
-// <http://www.gnu.org/licenses/>.
-
-#include <ext/random>
-
-template class __gnu_cxx::von_mises_distribution<float>;
-template class __gnu_cxx::von_mises_distribution<double>;
-template class __gnu_cxx::von_mises_distribution<long double>;
+++ /dev/null
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
-// { dg-require-cstdint "" }
-//
-// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net>
-// 2013-03-02 Ulrich Drepper <drepper@gmail.com>
-//
-// Copyright (C) 2013 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3. If not see
-// <http://www.gnu.org/licenses/>.
-
-#include <ext/random>
-
-void
-test01()
-{
- typedef __gnu_cxx::von_mises_distribution<double> test_type;
-
- typedef test_type::result_type result_type;
- typedef test_type::param_type param_type;
-}