1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
Index: python-scipy-0.10.1+dfsg1/scipy/special/cephes/kolmogorov.c
===================================================================
--- python-scipy-0.10.1+dfsg1.orig/scipy/special/cephes/kolmogorov.c 2011-03-09 20:40:54.000000000 -0500
+++ python-scipy-0.10.1+dfsg1/scipy/special/cephes/kolmogorov.c 2012-04-20 02:36:30.630431206 -0400
@@ -35,7 +35,7 @@
int v, nn;
double evn, omevn, p, t, c, lgamnp1;
- if (n <= 0 || e < 0.0 || e > 1.0)
+ if (!(n > 0 && e >= 0.0 && e <= 1.0))
return (NPY_NAN);
if (e == 0.0) return 1.0;
nn = (int) (floor ((double) n * (1.0 - e)));
@@ -86,7 +86,7 @@
{
double p, t, r, sign, x;
- if ( y < 1.1e-16 )
+ if ( y < 1.1e-16 )
return 1.0;
x = -2.0 * y * y;
sign = 1.0;
@@ -141,10 +141,10 @@
mtherr ("smirnovi", OVERFLOW);
return 0.0;
}
- if (++iterations > MAXITER)
+ if (++iterations > MAXITER)
{
mtherr ("smirnovi", TOOMANY);
- return (e);
+ return (e);
}
}
while (fabs (t / e) > 1e-10);
@@ -185,11 +185,11 @@
return 0.0;
}
y = y + t;
- if (++iterations > MAXITER)
+ if (++iterations > MAXITER)
{
mtherr ("kolmogi", TOOMANY);
- return (y);
- }
+ return (y);
+ }
}
while (fabs (t / y) > 1.0e-10);
return (y);
|