stdtrStudent's t distribution.
double t, stdtr();
y = stdtr(k, t);
Computes the integral from minus infinity to t of the Student t distribution with integer k > 0 degrees of freedom:
- | 2 -(k+1)/2
| ((k+1)/2) | ( x )
----------------- | ( 1 + --- ) dx
- | ( k )
sqrt(k pi) | (k/2) |
Relation to incomplete beta integral:
1 - stdtr(k,t) = 0.5 * incbet(k/2, 1/2, z)
z = k/(k + t**2).
For t < -2, this is the method of computation.
For higher t, a direct method is derived from integration by parts.
Since the function is symmetric about t=0, the area under the right tail of the density is found by calling the function with -t instead of t.
Tested at random 1 <= k <= 25. The 'domain' refers to t.
arithmetic domain # trials peak rms
IEEE -100,-2 50000 5.9e-15 1.4e-15
IEEE -2,100 500000 2.7e-15 4.9e-17