[OGRUG] extra .

Paul Gilbert pgilbert at bank-banque-canada.ca
Fri Aug 21 15:48:49 CEST 2009


I don't think it does anything.  For readability you might write 6.0 but 
that will not affect the computation.  There are some situations where  
6 is treated as an integer numeric and 6.0 as a double precision 
numeric,  which can be important when you call C or fortran code.    
Underneath I think 6^2 may call different code than 6.0^2 (integer vs 
real arithmetic) but I don't think that applies to sqrt().  In any case, 
you no longer have an integer after the * and  /.

Paul

Fischer _ Chen Ji Zheng wrote:
> sigma0 <- sqrt((6. * var(maxima))/pi) 
>
> What does the '.' do here?
> _________________________________________________________________
> Attention all humans. We are your photos. Free us.
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-UG-Ottawa mailing list
> R-UG-Ottawa at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-ug-ottawa
>   
====================================================================================

La version française suit le texte anglais.

------------------------------------------------------------------------------------

This email may contain privileged and/or confidential in...{{dropped:26}}



More information about the R-UG-Ottawa mailing list