scipy/scipy — pull request #3155 by WarrenWeckesser (2013-12-16 21:54:01+00:00)
Title: special: handle the edge case lambda=0 in pdtr, pdtrc and pdtrik

This PR makes a few changes so that `special.pdtr`, `special.pdtrc` and `special.pdtrik` give the correct limiting value when the Poisson parameter lambda is 0.

In the case of `pdtrik`, the function now immediately returns 0 for `lambda` < 0.01 and `p` < 0.975. This is a lot more than the simple edge case `lambda = 0`, but it is based on the following figure showing the results of computing `pdtrik` from master on a grid of values:

![pdtrik_plot](https://f.cloud.github.com/assets/321463/1759235/7643aaf0-669b-11e3-8065-f44a9d865b26.png)

The gray dots are where the result is 0. The red dots are where `pdtrik` returns 1e+100; the "correct" value is 0 at those points.