Computing <math>P(k;\lambda)</math> for given <math>k</math> and <math>\lambda</math> is a trivial task that can be accomplished by using the standard definition of <math>P(k;\lambda)</math> in terms of exponential, power, and factorial functions. However, the conventional definition of the Poisson distribution contains two terms that can easily overflow on computers: λ<sup>''k''</sup> and ''k''!. The fraction of λ<sup>''k''</sup> to ''k''! can also produce a rounding error that is very large compared to ''e''<sup>−λ</sup>, and therefore give an erroneous result. For numerical stability the Poisson probability mass function should therefore be evaluated as | Computing <math>P(k;\lambda)</math> for given <math>k</math> and <math>\lambda</math> is a trivial task that can be accomplished by using the standard definition of <math>P(k;\lambda)</math> in terms of exponential, power, and factorial functions. However, the conventional definition of the Poisson distribution contains two terms that can easily overflow on computers: λ<sup>''k''</sup> and ''k''!. The fraction of λ<sup>''k''</sup> to ''k''! can also produce a rounding error that is very large compared to ''e''<sup>−λ</sup>, and therefore give an erroneous result. For numerical stability the Poisson probability mass function should therefore be evaluated as |