See
http://docs.python.org/ref/integers.html.
Python is a bit odd in this respect: It's used mostly as a scripting
language, so why does it have this feature, while most data analysis languages
don't...
Andy
From
my c++ days I was under the impression that even an unsigned long integer has
a maximum, somewhere around 4,294,967,295.
--Matt
Perhaps it would be nice if Insightful can implement something
like what the latest version of Python has: automatically extend to `long
integer' when needed. `Long integer' in Python has no upper
limit.
Andy
Steve,
You are battling something you can't win. The threshold value
which can cause undetected overflow errors is > 2^(b-1)-1 where b is 32
for 32-bit systems. The largest value you can reliably represent as
an integer is 2,147,483,647. You can verify this with by looking at
> .Machine$integer.max [1] 2147483647
The number of 2,147,483,648 could (would?) overflow and could go
back to -1.
A decent intro reference for these kind of issues is Numerical
Issues in Statistical Computing for the Social Scientist by Altman, Gill
and McDonald.
--Matt
Dear All,
I am using SPLUS Professional Edition
Version 6.0.3 Release 2 for Microsoft Windows XP.
I found that if I do:
>1000000*1500000
# I get:
[1]
NA
A workaround is to do:
>1000000.0*1500000.0
[1]
1.5e+012
Is there a way I can correct for the above bug
without putting decimal places?
Thank you for your attention.
PS. No luck in getting SPLUS 6.1 in my university yet, as they
are out of licence!
Steve.
------------------------------------------------------------------------------ Notice:
This e-mail message, together with any attachments, contains information of
Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA
08889), and/or its affiliates (which may be known outside the United States
as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as Banyu) that
may be confidential, proprietary copyrighted and/or legally privileged. It
is intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and then
delete it from your
system. ------------------------------------------------------------------------------
------------------------------------------------------------------------------
Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as Banyu) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system.
------------------------------------------------------------------------------ |