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 3.12
sub units 5.12
+
0
MathsSpecialGamma

Gamma Upper Reg

viewed 1532 times and licensed 63 times
The regularized upper incomplete Gamma integral
Controller: CodeCogs

get GPL add to cart

Dependents

Info

Interface

C++
Excel

GammaUpper Reg

 
doublegammaUpper_regdoublea
doublex )
This function returns the regularized "upper" incomplete Gamma Integral. Regularization is equivalent to normalisation, ensuring the result always lies between 0 and 1. Thus

When x < 1 or x < a the solution is calculated using 1 - Maths/Special/Gamma/Gamma_Lower_Reg .

Accuracy

Tested at random a, x. <pre> Relative error: domain(a,x) domain # trials peak rms 0.5,100 0,100 200000 1.9e-14 1.7e-15 0.01,0.5 0,100 200000 1.4e-13 1.6e-15 </pre>

Note

In this implementation both arguments must be positive. The integral is evaluated by either a power series or continued fraction expansion, depending on the relative values of a and x.

Example:

#include <stdio.h>
#include <codecogs/maths/special/gamma/gamma_upper_reg.h>
void main
{
  for(double a=0; a<3; a+=0.25)
  {
    double y=Maths::Special::Gamma::gammaUpper_reg(a, 2);
    printf("\n gammaUpper_reg(%lf, 2)=%lf", a,y);
  }
}

Output:

gammaUpper_reg(0.000000, 2)=0.000000
gammaUpper_reg(0.250000, 2)=0.017286
gammaUpper_reg(0.500000, 2)=0.045500
gammaUpper_reg(0.750000, 2)=0.085056
gammaUpper_reg(1.000000, 2)=0.135335
gammaUpper_reg(1.250000, 2)=0.194847
gammaUpper_reg(1.500000, 2)=0.261464
gammaUpper_reg(1.750000, 2)=0.332706
gammaUpper_reg(2.000000, 2)=0.406006
gammaUpper_reg(2.250000, 2)=0.478944
gammaUpper_reg(2.500000, 2)=0.549416
gammaUpper_reg(2.750000, 2)=0.615734

References:

Cephes Math Library Release 2.8: June, 2000

Parameters

aargument. Must be positive.
xlower, positive, limit of the integral.

Authors

Stephen L.Moshier. Copyright 1984, 1987, 1989, 1992, 2000
Updated by Will Bateman
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.