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 0.50
sub units 1.40
+
0
MathsSpecialGamma

log Gamma Frac

Evaluates ln(gamma(b) / gamma(a+b)).
Controller: CodeCogs

Dependents

Info

Interface

C++

LogGammaFrac

 
doublelogGammaFracdoublea
doubleb )
Given two numbers, divides the gamma function of the 2nd by the gamma function of their sum, then returns the natural logarithm of the quotient:

See also Maths/Special/Gamma/logBeta

Example:

#include <codecogs/maths/special/gamma/loggammafrac.h>
#include <stdio.h>
int main()
{
  double a[10] = { 1.6, 1.4, 1.7, 2.0, 1.1, 1.1, 1.2, 1.3, 1.2, 1.5 };
  double b[10] = { 1.2, 2.0, 1.0, 1.2, 1.2, 1.7, 2.0, 1.5, 1.4, 1.5 };
  for( int i=0; i<10; i++ )
    printf( "logGammaFrac( %2.1f, %2.1f ) = %f\n",
            a[i], b[i], Maths::Special::Gamma::logGammaFrac( a[i], b[i] ) );
  return getchar();
}

Output:

logGammaFrac( 1.6, 1.2 ) = -0.602210
logGammaFrac( 1.4, 2.0 ) = -1.092328
logGammaFrac( 1.7, 1.0 ) = -0.435944
logGammaFrac( 2.0, 1.2 ) = -0.970912
logGammaFrac( 1.1, 1.2 ) = -0.239696
logGammaFrac( 1.1, 1.7 ) = -0.612513
logGammaFrac( 1.2, 2.0 ) = -0.885405
logGammaFrac( 1.3, 1.5 ) = -0.637494
logGammaFrac( 1.2, 1.4 ) = -0.477046
logGammaFrac( 1.5, 1.5 ) = -0.813939

Parameters

athe first number
bthe second number

Authors

Barry W. Brown, James Lovato, Kathy Russell
Updated by Vince Cole (April 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.