The reciprocal of the gamma function.

You're viewing an older version of this page (#163). View the current version.

View versions (1)

Interface

#include <codecogs/maths/special/gamma/gamma_rcp.h>

using namespace Maths::Special::Gamma;

Computation of 1/gamma(a) for 0.5 <= a <= 2.5

\frac { 1 } { \Gamma(a) }
(1)

Example 1

#include <stdio.h>
#include <codecogs/maths/special/gamma/gamma_rcp.h>
int main()
{
  for( double a=0.5; a<2.5; a+=0.1 )
    printf( "gamma_rcp( %2.1f ) = %f\n",
            a, Maths::Special::Gamma::gamma_rcp( a ) );
  return 0;
}

Output:

gamma_rcp( 0.5 ) = 0.564190
gamma_rcp( 0.6 ) = 0.671505
gamma_rcp( 0.7 ) = 0.770383
gamma_rcp( 0.8 ) = 0.858937
gamma_rcp( 0.9 ) = 0.935779
gamma_rcp( 1.0 ) = 1.000000
gamma_rcp( 1.1 ) = 1.051137
gamma_rcp( 1.2 ) = 1.089124
gamma_rcp( 1.3 ) = 1.114243
gamma_rcp( 1.4 ) = 1.127060
gamma_rcp( 1.5 ) = 1.128379
gamma_rcp( 1.6 ) = 1.119175
gamma_rcp( 1.7 ) = 1.100547
gamma_rcp( 1.8 ) = 1.073671
gamma_rcp( 1.9 ) = 1.039754
gamma_rcp( 2.0 ) = 1.000000
gamma_rcp( 2.1 ) = 0.955579
gamma_rcp( 2.2 ) = 0.907604
gamma_rcp( 2.3 ) = 0.857110
gamma_rcp( 2.4 ) = 0.805043

Parameters

x
the value at which to evaluate the function
GPL Licence — free for non commercial use. See Licence details.

Interactive Calculator

x
Result