I have forgotten
my Password

Or login with:

  • Facebookhttp://facebook.com/
  • Googlehttps://www.google.com/accounts/o8/id
  • Yahoohttps://me.yahoo.com
get GPL
COST (GBP)
this unit 1.40
sub units 0.00
+
0
MathsSpecialGamma

Trigamma

Evaluates the Trigamma function.
Controller: CodeCogs

Interface

C++
Excel

Trigamma

 
doubletrigammadoublex )
This component evaluates the Trigamma function with given parameters, defined by the second derivative of the logarithm of the Gamma function:

In the following example, arguments from the [3, 4] interval are used, with step equal to 0.2, to evaluate the Trigamma function.

Example 1

#include <codecogs/maths/special/gamma/trigamma.h>
#include <iostream>
#include <iomanip>
 
int main()
{
  std::cout << std::setprecision(10);
  for (double x = 3; x < 5; x += 0.2)
  {
    std::cout << "Trigamma(" << x << ") = ";
    std::cout << Maths::Special::Gamma::trigamma(x) << std::endl;
  }
  return 0;
}

Output

Trigamma(3) = 0.3949340655
Trigamma(3.2) = 0.3663211898
Trigamma(3.4) = 0.3415413972
Trigamma(3.6) = 0.3198778986
Trigamma(3.8) = 0.3007811415
Trigamma(4) = 0.2838229544
Trigamma(4.2) = 0.2686649398
Trigamma(4.4) = 0.2550362069
Trigamma(4.6) = 0.2427174048
Trigamma(4.8) = 0.2315290639

References

John Burkardt's library of statistical C++ routines, http://www.csit.fsu.edu/~burkardt/cpp_src/prob/prob.html

Parameters

xthe argument of the trigamma function

Returns

An approximation of the Trigamma function with the given argument.

Authors

Lucian Bentea (September 2005)
Source Code

Source code is available when you agree to a GP Licence or buy a Commercial Licence.

Not a member, then Register with CodeCogs. Already a Member, then Login.