Commit 934432b6 by Paolo Carlini

num_xbound_fun.cc: Minor tweaks.

2009-05-15  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/26_numerics/random/discrete_distribution/cons/
	num_xbound_fun.cc: Minor tweaks.
	* testsuite/26_numerics/random/piecewise_constant_distribution/
	cons/initlist_fun.cc: Likewise
	* testsuite/26_numerics/random/piecewise_constant_distribution/
	cons/num_xbound_fun.cc: Likewise
	* testsuite/26_numerics/random/piecewise_linear_distribution/
	cons/initlist_fun.cc: Likewise
	* testsuite/26_numerics/random/piecewise_linear_distribution/
	cons/num_xbound_fun.cc: Likewise

From-SVN: r147567
parent 125cae84
2009-05-15 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/26_numerics/random/discrete_distribution/cons/
num_xbound_fun.cc: Minor tweaks.
* testsuite/26_numerics/random/piecewise_constant_distribution/
cons/initlist_fun.cc: Likewise
* testsuite/26_numerics/random/piecewise_constant_distribution/
cons/num_xbound_fun.cc: Likewise
* testsuite/26_numerics/random/piecewise_linear_distribution/
cons/initlist_fun.cc: Likewise
* testsuite/26_numerics/random/piecewise_linear_distribution/
cons/num_xbound_fun.cc: Likewise
2009-05-15 David Billinghurst <billingd@gcc.gnu.org> 2009-05-15 David Billinghurst <billingd@gcc.gnu.org>
PR libstdc++/36211 PR libstdc++/36211
...@@ -6,16 +19,16 @@ ...@@ -6,16 +19,16 @@
2009-05-15 David Billinghurst <billingd@gcc.gnu.org> 2009-05-15 David Billinghurst <billingd@gcc.gnu.org>
* testsuite/26_numerics/random/discrete_distribution/cons/num_xbound_fun.cc: * testsuite/26_numerics/random/discrete_distribution/cons/
Replace non-standard macro M_PI with constant pi. num_xbound_fun.cc: Replace non-standard macro M_PI with constant pi.
* testsuite/26_numerics/random/piecewise_constant_distribution/cons/initlist_fun.cc: * testsuite/26_numerics/random/piecewise_constant_distribution/cons/
Likewise initlist_fun.cc: Likewise
* testsuite/26_numerics/random/piecewise_constant_distribution/cons/num_xbound_fun.cc: * testsuite/26_numerics/random/piecewise_constant_distribution/cons/
Likewise num_xbound_fun.cc: Likewise
* testsuite/26_numerics/random/piecewise_linear_distribution/cons/initlist_fun.cc: * testsuite/26_numerics/random/piecewise_linear_distribution/cons/
Likewise initlist_fun.cc: Likewise
* testsuite/26_numerics/random/piecewise_linear_distribution/cons/num_xbound_fun.cc: * testsuite/26_numerics/random/piecewise_linear_distribution/cons/
Likewise num_xbound_fun.cc: Likewise
2009-05-14 Paolo Carlini <paolo.carlini@oracle.com> 2009-05-14 Paolo Carlini <paolo.carlini@oracle.com>
......
...@@ -39,8 +39,9 @@ struct cosine_distribution ...@@ -39,8 +39,9 @@ struct cosine_distribution
return 0.0; return 0.0;
else if (x - _M_x0 > _M_lambda / 4) else if (x - _M_x0 > _M_lambda / 4)
return 0.0; return 0.0;
else { else
const double pi = 3.1415926535897932384626433832795029L; {
const double pi = 3.14159265358979323846;
return std::cos(2 * pi * (x - _M_x0) / _M_lambda); return std::cos(2 * pi * (x - _M_x0) / _M_lambda);
} }
} }
......
...@@ -19,7 +19,8 @@ ...@@ -19,7 +19,8 @@
// with this library; see the file COPYING3. If not see // with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>. // <http://www.gnu.org/licenses/>.
// 26.4.8.5.2 Class template piecewise_constant_distribution [rand.dist.samp.pconst] // 26.4.8.5.2 Class template piecewise_constant_distribution
// [rand.dist.samp.pconst]
// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist] // 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
#include <random> #include <random>
...@@ -39,8 +40,9 @@ struct cosine_distribution ...@@ -39,8 +40,9 @@ struct cosine_distribution
return 0.0; return 0.0;
else if (x - _M_x0 > _M_lambda / 4) else if (x - _M_x0 > _M_lambda / 4)
return 0.0; return 0.0;
else { else
const double pi = 3.1415926535897932384626433832795029L; {
const double pi = 3.14159265358979323846;
return std::cos(2 * pi * (x - _M_x0) / _M_lambda); return std::cos(2 * pi * (x - _M_x0) / _M_lambda);
} }
} }
......
...@@ -19,7 +19,8 @@ ...@@ -19,7 +19,8 @@
// with this library; see the file COPYING3. If not see // with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>. // <http://www.gnu.org/licenses/>.
// 26.4.8.5.2 Class template piecewise_constant_distribution [rand.dist.samp.pconst] // 26.4.8.5.2 Class template piecewise_constant_distribution
// [rand.dist.samp.pconst]
// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist] // 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
#include <random> #include <random>
...@@ -39,8 +40,9 @@ struct cosine_distribution ...@@ -39,8 +40,9 @@ struct cosine_distribution
return 0.0; return 0.0;
else if (x - _M_x0 > _M_lambda / 4) else if (x - _M_x0 > _M_lambda / 4)
return 0.0; return 0.0;
else { else
const double pi = 3.1415926535897932384626433832795029L; {
const double pi = 3.14159265358979323846;
return std::cos(2 * pi * (x - _M_x0) / _M_lambda); return std::cos(2 * pi * (x - _M_x0) / _M_lambda);
} }
} }
......
...@@ -19,7 +19,8 @@ ...@@ -19,7 +19,8 @@
// with this library; see the file COPYING3. If not see // with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>. // <http://www.gnu.org/licenses/>.
// 26.4.8.5.3 Class template piecewise_linear_distribution [rand.dist.samp.plinear] // 26.4.8.5.3 Class template piecewise_linear_distribution
// [rand.dist.samp.plinear]
// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist] // 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
#include <random> #include <random>
...@@ -39,8 +40,9 @@ struct cosine_distribution ...@@ -39,8 +40,9 @@ struct cosine_distribution
return 0.0; return 0.0;
else if (x - _M_x0 > _M_lambda / 4) else if (x - _M_x0 > _M_lambda / 4)
return 0.0; return 0.0;
else { else
const double pi = 3.1415926535897932384626433832795029L; {
const double pi = 3.14159265358979323846;
return std::cos(2 * pi * (x - _M_x0) / _M_lambda); return std::cos(2 * pi * (x - _M_x0) / _M_lambda);
} }
} }
......
...@@ -19,7 +19,8 @@ ...@@ -19,7 +19,8 @@
// with this library; see the file COPYING3. If not see // with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>. // <http://www.gnu.org/licenses/>.
// 26.4.8.5.3 Class template piecewise_linear_distribution [rand.dist.samp.plinear] // 26.4.8.5.3 Class template piecewise_linear_distribution
// [rand.dist.samp.plinear]
// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist] // 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
#include <random> #include <random>
...@@ -39,8 +40,9 @@ struct cosine_distribution ...@@ -39,8 +40,9 @@ struct cosine_distribution
return 0.0; return 0.0;
else if (x - _M_x0 > _M_lambda / 4) else if (x - _M_x0 > _M_lambda / 4)
return 0.0; return 0.0;
else { else
const double pi = 3.1415926535897932384626433832795029L; {
const double pi = 3.14159265358979323846;
return std::cos(2 * pi * (x - _M_x0) / _M_lambda); return std::cos(2 * pi * (x - _M_x0) / _M_lambda);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment