On R, as.integer(2^31-1) is the maximum (without returning NA) but the
lowest is -2147483647 (-2^31+1)
> as.integer((-2)^31)
[1] NA
So in both Java and C can hold 2^32 different values, but R holds 2^32
-1 different values.
Have I made a mistake? Is there a reason for the difference?
Thank you
Saptarshi
______________________________________________
R-h...@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.
src/main/arithmetic.c:157: R_NaInt = INT_MIN;
(R-devel seems more appropriate for this question).
Martin
Saptarshi Guha <saptars...@gmail.com> writes:
--
Martin Morgan
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109
Location: Arnold Building M1 B861
Phone: (206) 667-2793
Aha! Yes, I missed that.
>
> (R-devel seems more appropriate for this question).
Yes, i was not sure.