Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Highlighted
##

i have found the gamma function but NOT the incomplete gamma function. Is this function lacking in the intel fortran?it seems so strange!thanks gabriella

Gabriella_Petaccia

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-08-2012
09:25 AM

36 Views

incomplete gamma function

3 Replies

Highlighted
##

It is not strange to find that an infrequently used special function is not part of the standard library.

There are scores of special functions that are not provided as standard intrinsic functions in Fortran or other programming languages. It is up to you to find a library such as IMSL, or source code from places such as the Netlib collection (the function you want is probably DGAMI).

mecej4

Black Belt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-08-2012
09:52 AM

36 Views

There are scores of special functions that are not provided as standard intrinsic functions in Fortran or other programming languages. It is up to you to find a library such as IMSL, or source code from places such as the Netlib collection (the function you want is probably DGAMI).

Highlighted
##

Here is code written in java for IncGamma.This code uses my gamma stirling method if are you interested i can post the code.

[bash]public double IncGammaLow(double x,double a){ double sum = 0; double result = 0; if(x < 0.0f){ throw new IllegalArgumentException("arg x must be greater than 0 t" + x); }else if( a < 0.0f || a == 0.0f || a < 1.0f){ throw new IllegalArgumentException("arg a must be not less than 1.0 t" + a); }else{ double exp,gamma_arg,gamma,nom,denom,power,gamma2; long k; int i,j; double[]array = new double[32]; double run_value; k = -1; run_value = 0; for(i = 0;i = run_value;
}
for(j = 0;j;
}
exp = Math.exp(-x);
power = Math.pow(x, a);
gamma2 = this.GammaStirlingApprox(a);
result = power*gamma2*exp*sum;
}
return result;
}[/bash]

Bernard

Black Belt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-31-2012
10:28 AM

36 Views

[bash]public double IncGammaLow(double x,double a){ double sum = 0; double result = 0; if(x < 0.0f){ throw new IllegalArgumentException("arg x must be greater than 0 t" + x); }else if( a < 0.0f || a == 0.0f || a < 1.0f){ throw new IllegalArgumentException("arg a must be not less than 1.0 t" + a); }else{ double exp,gamma_arg,gamma,nom,denom,power,gamma2; long k; int i,j; double[]array = new double[32]; double run_value; k = -1; run_value = 0; for(i = 0;i

Highlighted
##

Gabriella, here you'll find a code for the incomplete gamma function for complex arguments:

http://www.cmis.csiro.au/Alan_Miller/index.html

Just look up for the cincgam.f90 code.

rudi-gaelzer

New Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-01-2012
09:37 AM

36 Views

http://www.cmis.csiro.au/Alan_Miller/index.html

Just look up for the cincgam.f90 code.

For more complete information about compiler optimizations, see our Optimization Notice.