question: public static double igamma ( double a , double x ) { double coef = ( Math . exp ( - x ) * Math . pow ( x , a ) ) / gamma ( a ) ; double sum = 0.0 ; for ( int i = 0 ; i < 100 ; i ++ ) { sum += ( gamma ( a ) / gamma ( a + 1.0 + ( double ) i ) ) * Math . pow ( x , ( double ) i ) ; } return ( coef * sum ) ; }
target:  Calculates the incomplete gamma function for two doubles