Re: [ROOT] inf/nan from TMath::Poisson

From: Rene Brun (Rene.Brun@cern.ch)
Date: Mon Apr 26 2004 - 19:51:17 MEST


Ken,

I will be happy to add any suggestion you might have to protect the code
against the case you mention.

Rene Brun

On 
Mon, 26 Apr 2004, Ken Bloom wrote:

> Dear ROOTers,
> 
> 	I'm using ROOT 3.05/07, and am getting non-numerical results out of 
> the TMath::Poisson function, under what I admit are extreme conditions:
> 
> root [2] TMath::Poisson(170,70)
> Error: Symbol inf is not defined in current scope  FILE: LINE:0
> (Double_t)inf
> *** Interpreter error recovered ***
> 
> Yes, I know that the result should be a very tiny number, but I would prefer 
> that I get 0.0 (or its moral equivalent) rather than something I can't do math 
> with.  Can you recommend a protection against this?  Thanks, best wishes.
> 
> 						Ken Bloom
> 
> ------------------------------------------------------------------------------
> Ken Bloom, Karma Adjuster                                Department of Physics
> 734-763-2329 / 734-936-1817 (fax)                       University of Michigan
> kenbloom@umich.edu                              http://www.umich.edu/~kenbloom
> 



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:07 MET