Re: [ROOT] Sin(150/100)??

From: cstrato (aon.912121399@aon.at)
Date: Thu Aug 21 2003 - 20:23:24 MEST


Dear Rene

Thank you, I did not know that this is expected C++ behavior, I hope
that the compilers issue a warning, otherwise I suspect that this is the
cause of a lot of bugs in commercial applications.

Best regards
Christian

Rene Brun wrote:

>Hi Christian,
>
>This is the expected C++ behaviour. If you run with the compiler,
>you will get the same result.
>
>Rene Brun
>
>On Thu, 
>21 Aug 2003, cstrato wrote:
>
>  
>
>>Dear Rooters
>>
>>By chance I came across the following problem:
>>root [13] TMath::Sin(100/100)
>>(Double_t)8.41470984807896505e-01
>>root [14] TMath::Sin(150/100)
>>(Double_t)8.41470984807896505e-01
>>root [15] TMath::Sin(1)      
>>(Double_t)8.41470984807896505e-01
>>root [16] TMath::Sin(1.5)
>>(Double_t)9.97494986604054446e-01
>>root [23] TMath::Sin(150.0/100)
>>(Double_t)9.97494986604054446e-01
>>
>>Although 150 and 100 are integers, 150/100 should be
>>recognized as real.
>>
>>(I am using root 3.10/00 for MacOS X)
>>
>>Best regards
>>Christian
>>_._._._._._._._._._._._._._._._
>>C.h.i.s.t.i.a.n S.t.r.a.t.o.w.a
>>V.i.e.n.n.a       A.u.s.t.r.i.a
>>_._._._._._._._._._._._._._._._
>>
>>
>>
>>    
>>
>
>
>
>  
>



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:15 MET