Dear gentlemen,

Can you explain me why the following happens (any OS I think, and even on 64 bits)?

> sum(1000:1205)^2
[1] 51581223225
> sum(1000:1205)*sum(1000:1205)
[1] NA
Warning message:
In sum(1000:1205) * sum(1000:1205) : NAs produced by integer overflow

Best,

Pierre

--
Pierre Lafaye de Micheaux
Adresse courrier:
Département de Mathématiques et Statistique
Université de Montréal
CP 6128, succ. Centre-ville
Montréal, Québec H3C 3J7
CANADA

Adresse physique:
Département de Mathématiques et Statistique
Bureau 4249, Pavillon André-Aisenstadt
2920, chemin de la Tour
Montréal, Québec H3T 1J4
CANADA

Tél.: (00-1) 514-343-6607 / Fax: (00-1) 514-343-5700
laf...@dms.umontreal.ca
http://www.biostatisticien.eu

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to