Skip to content
Prev 56108 / 63424 Next

Bug report: Function ppois(0:20, lambda=0.9) does not generate a non-decreasing result.

Le 04/12/2018 ? 11:27, I?aki Ucar a ?crit?:
Well, here the request may be interpreted not as "do it without round 
error" which is indeed unavoidable but rather "please cope with rounding 
errors in a way that return consistent result for ppois()". You have 
indicated one way to do so (I have just added exp() in the row):

any(diff(exp(ppois(0:19, lambda=0.9, log.p=TRUE))) < 0)
#[1] FALSE

But may be there is another, more economic way?

Serguei.