long double get_dndT_den(struct device *in,long double top,long double T,int mat) { long double ret=0.0; long double N=in->dosn[mat].config.Nc; ret= -((top*Q)/kb)*N*gexp((top*Q)/(kb*T))*gpow(T,-2.0); return ret; }
static GmpFloat binomRowGmp(GmpFloat const p, uint64_t const k, uint64_t const n, unsigned int prec) { GmpFloat r(0,prec); GmpFloat const q = GmpFloat(1,prec)-p; GmpFloat const tp = GmpFloat(1.0,prec); GmpFloat const tq = gpow(q,n); GmpFloat f = GmpFloat(1.0,prec) * tp * tq; for ( uint64_t i = 0; i <= k; ++i ) { r += f; f *= p; f /= q; f /= (i+1); f *= (n-i); } return r; }