summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/tr1/gamma.tcc
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/include/tr1/gamma.tcc')
-rw-r--r--libstdc++-v3/include/tr1/gamma.tcc35
1 files changed, 16 insertions, 19 deletions
diff --git a/libstdc++-v3/include/tr1/gamma.tcc b/libstdc++-v3/include/tr1/gamma.tcc
index a642eec5638..7ec19a3ed38 100644
--- a/libstdc++-v3/include/tr1/gamma.tcc
+++ b/libstdc++-v3/include/tr1/gamma.tcc
@@ -67,7 +67,8 @@ namespace tr1
* @return The Bernoulli number of order n.
*/
template <typename _Tp>
- _Tp __bernoulli_series(unsigned int __n)
+ _Tp
+ __bernoulli_series(unsigned int __n)
{
static const _Tp __num[28] = {
@@ -130,10 +131,8 @@ namespace tr1
*/
template<typename _Tp>
inline _Tp
- __bernoulli(const int __n)
- {
- return __bernoulli_series<_Tp>(__n);
- }
+ __bernoulli(int __n)
+ { return __bernoulli_series<_Tp>(__n); }
/**
@@ -146,7 +145,7 @@ namespace tr1
*/
template<typename _Tp>
_Tp
- __log_gamma_bernoulli(const _Tp __x)
+ __log_gamma_bernoulli(_Tp __x)
{
_Tp __lg = (__x - _Tp(0.5L)) * std::log(__x) - __x
+ _Tp(0.5L) * std::log(_Tp(2)
@@ -174,7 +173,7 @@ namespace tr1
*/
template<typename _Tp>
_Tp
- __log_gamma_lanczos(const _Tp __x)
+ __log_gamma_lanczos(_Tp __x)
{
const _Tp __xm1 = __x - _Tp(1);
@@ -218,7 +217,7 @@ namespace tr1
*/
template<typename _Tp>
_Tp
- __log_gamma(const _Tp __x)
+ __log_gamma(_Tp __x)
{
if (__x > _Tp(0.5L))
return __log_gamma_lanczos(__x);
@@ -245,7 +244,7 @@ namespace tr1
*/
template<typename _Tp>
_Tp
- __log_gamma_sign(const _Tp __x)
+ __log_gamma_sign(_Tp __x)
{
if (__x > _Tp(0))
return _Tp(1);
@@ -276,7 +275,7 @@ namespace tr1
*/
template<typename _Tp>
_Tp
- __log_bincoef(const unsigned int __n, const unsigned int __k)
+ __log_bincoef(unsigned int __n, unsigned int __k)
{
// Max e exponent before overflow.
static const _Tp __max_bincoeff
@@ -307,7 +306,7 @@ namespace tr1
*/
template<typename _Tp>
_Tp
- __bincoef(const unsigned int __n, const unsigned int __k)
+ __bincoef(unsigned int __n, unsigned int __k)
{
// Max e exponent before overflow.
static const _Tp __max_bincoeff
@@ -330,10 +329,8 @@ namespace tr1
*/
template<typename _Tp>
inline _Tp
- __gamma(const _Tp __x)
- {
- return std::exp(__log_gamma(__x));
- }
+ __gamma(_Tp __x)
+ { return std::exp(__log_gamma(__x)); }
/**
@@ -351,7 +348,7 @@ namespace tr1
*/
template<typename _Tp>
_Tp
- __psi_series(const _Tp __x)
+ __psi_series(_Tp __x)
{
_Tp __sum = -__numeric_constants<_Tp>::__gamma_e() - _Tp(1) / __x;
const unsigned int __max_iter = 100000;
@@ -381,7 +378,7 @@ namespace tr1
*/
template<typename _Tp>
_Tp
- __psi_asymp(const _Tp __x)
+ __psi_asymp(_Tp __x)
{
_Tp __sum = std::log(__x) - _Tp(0.5L) / __x;
const _Tp __xx = __x * __x;
@@ -412,7 +409,7 @@ namespace tr1
*/
template<typename _Tp>
_Tp
- __psi(const _Tp __x)
+ __psi(_Tp __x)
{
const int __n = static_cast<int>(__x + 0.5L);
const _Tp __eps = _Tp(4) * std::numeric_limits<_Tp>::epsilon();
@@ -441,7 +438,7 @@ namespace tr1
*/
template<typename _Tp>
_Tp
- __psi(const unsigned int __n, const _Tp __x)
+ __psi(unsigned int __n, _Tp __x)
{
if (__x <= _Tp(0))
std::__throw_domain_error(__N("Argument out of range "