Skip to content
Prev 374540 / 398513 Next

NAs produced by integer overflow, but only some time ...

Before responding to Jeff's posting, let me reiterate my question: Why
does a function using m1*m1 produce an integer overflow, but m1^2 does
not?

As for Jeff's 'response':
Yes, that's all great and I knew that from
<https://stackoverflow.com/questions/8804779/what-is-integer-overflow-in-r-and-how-can-it-happen>.
Responding to a post and never seeing that the provided code does
actually show how I call the function does not constitute a useful
answer. To avoid such gaffes you can use your reading skills to
confirm that the perceived lack of a function call is in fact such a
lack. In addition, typing m1 <- 61224 makes the multiplication example
that I shows in the bottom part of the posting reproducible ...
I did provide the information for the sake of comprehensiveness and I
did mention that the problem also showed up in the console; the whole
second part of the post was on that.
On this mailing list, your assessment of calculation sequences and
their comparison to others you have seen is at best irrelevant and at
worst off-topic since it doesn't answer the question. I didn't ask
(you or anyone) to grade my code and there are reasons why "*" and
return where used there as they are) but to answer the question why
m1*m1 returned an error and m1^2 does not.