[SciPy-dev] scipy.stats: sf for symmetric distributions.
David Warde-Farley
dwf@cs.toronto....
Wed Sep 16 16:01:47 CDT 2009
On 16-Sep-09, at 3:53 PM, David Warde-Farley wrote:
> incidentally, this breaks two
> ttest tests because they differ in the 17th decimal place, how sure
> are you of those hard-coded numbers?).
I just did the integral with Sage and requested 100 bits of precision,
more than we need, and got
sage: thepdf
1/4*sqrt(2)/(1/2*x^2 + 1)^(3/2)
sage: n(2 * integral(thepdf, x, -infinity, -1), prec=100)
0.42264973081037423549085121950
And in IPython:
In [92]: np.float64(0.42264973081037423549085121950)
Out[92]: 0.42264973081037421
So it seems that ...21 is the right answer and the hardcoded ...27 is
actually the result of roundoff, it would seem.
I've fixed the tests.
David
More information about the Scipy-dev
mailing list