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
This commit is contained in:
parent
125cae84d0
commit
934432b66c
6 changed files with 56 additions and 34 deletions
|
@ -1,3 +1,16 @@
|
|||
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>
|
||||
|
||||
PR libstdc++/36211
|
||||
|
@ -6,16 +19,16 @@
|
|||
|
||||
2009-05-15 David Billinghurst <billingd@gcc.gnu.org>
|
||||
|
||||
* testsuite/26_numerics/random/discrete_distribution/cons/num_xbound_fun.cc:
|
||||
Replace non-standard macro M_PI with constant pi.
|
||||
* 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
|
||||
* testsuite/26_numerics/random/discrete_distribution/cons/
|
||||
num_xbound_fun.cc: Replace non-standard macro M_PI with constant pi.
|
||||
* 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-14 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
|
|
|
@ -39,10 +39,11 @@ struct cosine_distribution
|
|||
return 0.0;
|
||||
else if (x - _M_x0 > _M_lambda / 4)
|
||||
return 0.0;
|
||||
else {
|
||||
const double pi = 3.1415926535897932384626433832795029L;
|
||||
return std::cos(2 * pi * (x - _M_x0) / _M_lambda);
|
||||
}
|
||||
else
|
||||
{
|
||||
const double pi = 3.14159265358979323846;
|
||||
return std::cos(2 * pi * (x - _M_x0) / _M_lambda);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
// with this library; see the file COPYING3. If not see
|
||||
// <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]
|
||||
|
||||
#include <random>
|
||||
|
@ -39,10 +40,11 @@ struct cosine_distribution
|
|||
return 0.0;
|
||||
else if (x - _M_x0 > _M_lambda / 4)
|
||||
return 0.0;
|
||||
else {
|
||||
const double pi = 3.1415926535897932384626433832795029L;
|
||||
return std::cos(2 * pi * (x - _M_x0) / _M_lambda);
|
||||
}
|
||||
else
|
||||
{
|
||||
const double pi = 3.14159265358979323846;
|
||||
return std::cos(2 * pi * (x - _M_x0) / _M_lambda);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
// with this library; see the file COPYING3. If not see
|
||||
// <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]
|
||||
|
||||
#include <random>
|
||||
|
@ -39,10 +40,11 @@ struct cosine_distribution
|
|||
return 0.0;
|
||||
else if (x - _M_x0 > _M_lambda / 4)
|
||||
return 0.0;
|
||||
else {
|
||||
const double pi = 3.1415926535897932384626433832795029L;
|
||||
return std::cos(2 * pi * (x - _M_x0) / _M_lambda);
|
||||
}
|
||||
else
|
||||
{
|
||||
const double pi = 3.14159265358979323846;
|
||||
return std::cos(2 * pi * (x - _M_x0) / _M_lambda);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
// with this library; see the file COPYING3. If not see
|
||||
// <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]
|
||||
|
||||
#include <random>
|
||||
|
@ -39,10 +40,11 @@ struct cosine_distribution
|
|||
return 0.0;
|
||||
else if (x - _M_x0 > _M_lambda / 4)
|
||||
return 0.0;
|
||||
else {
|
||||
const double pi = 3.1415926535897932384626433832795029L;
|
||||
return std::cos(2 * pi * (x - _M_x0) / _M_lambda);
|
||||
}
|
||||
else
|
||||
{
|
||||
const double pi = 3.14159265358979323846;
|
||||
return std::cos(2 * pi * (x - _M_x0) / _M_lambda);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
// with this library; see the file COPYING3. If not see
|
||||
// <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]
|
||||
|
||||
#include <random>
|
||||
|
@ -39,10 +40,11 @@ struct cosine_distribution
|
|||
return 0.0;
|
||||
else if (x - _M_x0 > _M_lambda / 4)
|
||||
return 0.0;
|
||||
else {
|
||||
const double pi = 3.1415926535897932384626433832795029L;
|
||||
return std::cos(2 * pi * (x - _M_x0) / _M_lambda);
|
||||
}
|
||||
else
|
||||
{
|
||||
const double pi = 3.14159265358979323846;
|
||||
return std::cos(2 * pi * (x - _M_x0) / _M_lambda);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Reference in a new issue