Re: [ROOT] Integer Division Error

From: Sebastien Greder (greder@in2p3.fr)
Date: Mon Nov 18 2002 - 14:52:17 MET


I usually do like this to be sure :

Double_t x = (Double_t)2/3;

seb.

On Mon, 18 Nov 2002, Steffen Grohmann wrote:

> Hello,
>  
> I found a problem dividing integers in root. For instance, when I
> declare:
>   Double_t x = 2/3;
> the result of x is "0". The operation only works when I write:
>   Double_t x = 2./3.;
>  
> Could you please tell me if this is "normal" behavior in root?
>  
> Regards, Steffen
>  
> 



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:18 MET