[SciPy-dev] scipy.stats: sf for symmetric distributions.

David Warde-Farley dwf@cs.toronto....
Wed Sep 16 13:50:23 CDT 2009


Hi,

I just noticed that the way _sf() is implemented in the base class is  
particularly horrible for continuous distributions that are symmetric  
about the origin, where 1.0 - cdf(x) is prone to roundoff error and  
could just as easily be calculated as cdf(-x).

I wonder if this is a common enough case that that there ought to be  
an rv_continuous_zerosym class that candidate distributions inherit  
from, or if we should just override the method on a case by case basis.

David


More information about the Scipy-dev mailing list