I have some t-values and degrees of freedom and want to find the p-values from them (it's two-tailed). In the real world I would use a t-test table in the back of a Statistics textbook; however, I am using stdtr or stats.t.sf function in python. Both of them work fine for small degrees of freedom but give me nan for large degrees of freedom :
pf = 2*stdtr(dof, -np.abs(tf))
pval = 2*stats.t.sf(np.abs(tf), dof-1)
tf = -11.374250, dof=-2176568.362223 gives pf and pval= nan.
Can you please help me understand what is happening here internally. Besides, how can read the code for these internal functions of python.