Trigamma
Evaluates the Trigamma function.
Controller:
CodeCogs
Interface
#include <codecogs/maths/special/gamma/trigamma.h>
using namespace Maths::Special::Gamma;
| double | trigamma (double x)
Evaluates the Trigamma function. |
These functions are available for Microsoft Excel (
Login to download):
| Real | cc_trigamma (Real x) |
Use the following HTML code to embed the calculators within other websites:
| Name | HTML Code |
|---|
trigamma
Evaluates the Trigamma function. | |
Trigamma
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
| x | the 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.
You must login to leave a messge