num_xbound_fun.cc: Replace non-standard macro M_PI with constant pi.
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 From-SVN: r147564
This commit is contained in:
parent
84fb43a1a4
commit
d05db9ccfa
@ -1,3 +1,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
|
||||||
|
|
||||||
2009-05-14 Paolo Carlini <paolo.carlini@oracle.com>
|
2009-05-14 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
PR libstdc++/40123
|
PR libstdc++/40123
|
||||||
|
@ -39,8 +39,10 @@ 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 {
|
||||||
return std::cos(2 * M_PI * (x - _M_x0) / _M_lambda);
|
const double pi = 3.1415926535897932384626433832795029L;
|
||||||
|
return std::cos(2 * pi * (x - _M_x0) / _M_lambda);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -39,8 +39,10 @@ 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 {
|
||||||
return std::cos(2 * M_PI * (x - _M_x0) / _M_lambda);
|
const double pi = 3.1415926535897932384626433832795029L;
|
||||||
|
return std::cos(2 * pi * (x - _M_x0) / _M_lambda);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -39,8 +39,10 @@ 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 {
|
||||||
return std::cos(2 * M_PI * (x - _M_x0) / _M_lambda);
|
const double pi = 3.1415926535897932384626433832795029L;
|
||||||
|
return std::cos(2 * pi * (x - _M_x0) / _M_lambda);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -39,8 +39,10 @@ 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 {
|
||||||
return std::cos(2 * M_PI * (x - _M_x0) / _M_lambda);
|
const double pi = 3.1415926535897932384626433832795029L;
|
||||||
|
return std::cos(2 * pi * (x - _M_x0) / _M_lambda);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -39,8 +39,10 @@ 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 {
|
||||||
return std::cos(2 * M_PI * (x - _M_x0) / _M_lambda);
|
const double pi = 3.1415926535897932384626433832795029L;
|
||||||
|
return std::cos(2 * pi * (x - _M_x0) / _M_lambda);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user