mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-19 22:00:05 +08:00
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
@ -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>
|
2009-05-15 David Billinghurst <billingd@gcc.gnu.org>
|
||||||
|
|
||||||
PR libstdc++/36211
|
PR libstdc++/36211
|
||||||
@ -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,10 +39,11 @@ 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;
|
{
|
||||||
return std::cos(2 * pi * (x - _M_x0) / _M_lambda);
|
const double pi = 3.14159265358979323846;
|
||||||
}
|
return std::cos(2 * pi * (x - _M_x0) / _M_lambda);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -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,10 +40,11 @@ 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;
|
{
|
||||||
return std::cos(2 * pi * (x - _M_x0) / _M_lambda);
|
const double pi = 3.14159265358979323846;
|
||||||
}
|
return std::cos(2 * pi * (x - _M_x0) / _M_lambda);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -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,10 +40,11 @@ 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;
|
{
|
||||||
return std::cos(2 * pi * (x - _M_x0) / _M_lambda);
|
const double pi = 3.14159265358979323846;
|
||||||
}
|
return std::cos(2 * pi * (x - _M_x0) / _M_lambda);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -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,10 +40,11 @@ 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;
|
{
|
||||||
return std::cos(2 * pi * (x - _M_x0) / _M_lambda);
|
const double pi = 3.14159265358979323846;
|
||||||
}
|
return std::cos(2 * pi * (x - _M_x0) / _M_lambda);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -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,10 +40,11 @@ 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;
|
{
|
||||||
return std::cos(2 * pi * (x - _M_x0) / _M_lambda);
|
const double pi = 3.14159265358979323846;
|
||||||
}
|
return std::cos(2 * pi * (x - _M_x0) / _M_lambda);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user