nan/inf behaviour in ROOT

From: Vito Di Benedetto <vito.dibenedetto_at_le.infn.it>
Date: Thu, 11 Mar 2010 09:51:35 +0100


  Dear ROOT experts,

 I'm using ROOT 5.26.00. In this ROOT version I have an unexpected behaviour in handling float numbers.

If I type the following instruction

root [0] Float_t a = 0.
root [1] Float_t b = 10.
root [2] b/a

(double)inf

root [3] Float_t c = -10.
root [4] TMath::Sqrt(c)
(const double)nan

 I don't get exception. I have just inf or nan.

 The same happen on my framework based on ROOT. I prefer to get floating point exception instead of inf/nan. In this way I can check better in my framework if there some "strange Physics effect".

 Please, there is some way to get back floating point exception?

Cheers,

        Vito Received on Thu Mar 11 2010 - 09:51:40 CET

This archive was generated by hypermail 2.2.0 : Thu Mar 11 2010 - 23:50:01 CET