Commit e1a02963 by Paolo Carlini Committed by Paolo Carlini

random.tcc (cauchy_distribution<>:: operator()(_UniformRandomNumberGenerator&,…

random.tcc (cauchy_distribution<>:: operator()(_UniformRandomNumberGenerator&, const param_type&)): Avoid M_PI, a glibc extension.

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

	* include/bits/random.tcc (cauchy_distribution<>::
	operator()(_UniformRandomNumberGenerator&, const param_type&)): 
	Avoid M_PI, a glibc extension.

From-SVN: r147521
parent 4d3aadab
2009-05-14 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/random.tcc (cauchy_distribution<>::
operator()(_UniformRandomNumberGenerator&, const param_type&)):
Avoid M_PI, a glibc extension.
2009-05-13 Ben Elliston <bje@au.ibm.com>
* include/Makefile.am (PCHFLAGS): Remove -Winvalid-pch.
......
......@@ -1653,12 +1653,11 @@ namespace std
__aurng(__urng);
_RealType __u;
do
{
__u = __aurng();
}
__u = __aurng();
while (__u == 0.5);
return __p.a() + __p.b() * std::tan(M_PI * __u);
const _RealType __pi = 3.1415926535897932384626433832795029L;
return __p.a() + __p.b() * std::tan(__pi * __u);
}
template<typename _RealType, typename _CharT, typename _Traits>
......
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