- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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).
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).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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]
[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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
http://www.cmis.csiro.au/Alan_Miller/index.html
Just look up for the cincgam.f90 code.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page