#include "../rng.h" #include "./incomplete_gamma.h" #include #define PI 3.1415926535897932384626433832795028841971693993751 // using the power series proves to be very fast and very accurate. double igam(double s, double z){ if( (s<=0 || z<=0)){ return 0.0; } int rounds = 50; double sum = 0; for(int k=0; k {}", t,ret); return ret; }; sum+=func(0); sum+=func(x); for(int i=1; i