# HG changeset patch # User Rik # Date 1308376582 25200 # Node ID 89d41b6aa661df749f47469119e56b9999f71203 # Parent e7cc2d4a6db32713930224b83a5c3fb0455508db cauchy_cdf.m: Allow valid -Inf, Inf inputs. * cauchy_cdf.m: Remove unnecessary test for input x > -Inf, x < Inf. diff -r e7cc2d4a6db3 -r 89d41b6aa661 scripts/statistics/distributions/cauchy_cdf.m --- a/scripts/statistics/distributions/cauchy_cdf.m Thu Jun 16 21:05:10 2011 -0700 +++ b/scripts/statistics/distributions/cauchy_cdf.m Fri Jun 17 22:56:22 2011 -0700 @@ -48,8 +48,8 @@ sz = size (x); cdf = NaN (sz); - k = find ((x > -Inf) & (x < Inf) & (location > -Inf) & - (location < Inf) & (scale > 0) & (scale < Inf)); + k = find ((location > -Inf) & (location < Inf) + & (scale > 0) & (scale < Inf)); if (any (k)) if (isscalar (location) && isscalar (scale)) cdf(k) = 0.5 + atan ((x(k) - location) ./ scale) / pi;