Trigamma
Evaluates the Trigamma function.
Controller: CodeCogs
Contents
Interface
C++
Excel
Trigamma
doubletrigamma( | double | x | ) |
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.