The cdfpoi function has difficulties to invert particular inputs.
Reported by Michael BAUDIN
-- Bug description --
The cdfpoi function has difficulties to invert particular inputs.
-- Scilab error message --
-->x = cdfpoi("S",lambda,P,Q)
!--error 999
Answer appears to be lower than lowest search bound 0.000000
It appears that, for that particular input, the CDF has not full accuracy.
-->abs(P1-P)/abs(P)
ans =
1.080793345213244708D-14
should be 10^-16, or 10^-15.
-- How to reproduce the bug --
lambda = 200;
P = 1.383896526736738008D-87;
Q = 1;
x = cdfpoi("S",lambda,P,Q)
expectedX = 0;
[P1,Q1]=cdfpoi("PQ",expectedX,lambda);
abs(P1-P)/abs(P)
abs(Q1-Q)/abs(Q)