By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,764 Members | 1,466 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,764 IT Pros & Developers. It's quick & easy.

Integer, 64 Bit, signed and unsigned

P: n/a
Hi,

i'd like to use 64 Bit Integer values in Python,
can anybody give me a hint on what are the limits
in Python?

Can i use signed and unsigned 64 Bit Integers?
Thanks for hints,
Torsten.

Jul 18 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Torsten Mohr wrote:
Hi,

i'd like to use 64 Bit Integer values in Python,
can anybody give me a hint on what are the limits
in Python?

Can i use signed and unsigned 64 Bit Integers?
Thanks for hints,
Torsten.


Hi,

I havn't tried it myself, since i don't own a 64-Bit processor, but
http://groups.google.de/groups?hl=de...com%26rnum%3D1
and
http://groups.google.de/groups?hl=de...com%26rnum%3D2
say, that you can use 64 bit integers in CPython, if your C compiller
supports 64 bit integer. May also depend on your OS.

But you have to read some groups in http://groups.google.com
Just search for 'Python 64 bit'. This will give you a lot of results, I
guess.
I think many people here can give you further information

Christian von Essen
Jul 18 '05 #2

P: n/a

"Torsten Mohr" <tm***@s.netic.de> wrote in message
news:c4**********@schleim.qwe.de...
Hi,

i'd like to use 64 Bit Integer values in Python,
can anybody give me a hint on what are the limits
in Python?

Can i use signed and unsigned 64 Bit Integers?
Yes and no. Python has unlimited precision long
integers, so it should work without any special
effort for most things.

If you're trying to exploit truncation at the 64 bit
mark, though, you'll have to do it yourself with
tests.

John Roth

Thanks for hints,
Torsten.

Jul 18 '05 #3

P: n/a
Torsten Mohr wrote:
Hi,

i'd like to use 64 Bit Integer values in Python,
can anybody give me a hint on what are the limits
in Python?

Can i use signed and unsigned 64 Bit Integers?
Thanks for hints,
Torsten.

10**100

10000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 0L

As for signed integers, the sky's the limit :-)

Peter
Jul 18 '05 #4

P: n/a
Arithmetic with 8-byte integers will be much faster when using Fortran
and C++ compilers that directly support it, compared to Python, which
resorts to infinite precision arithmetic when 4-byte integers cannot
be used. Search for "speed integer*8" in this newsgroup -- there was a
discussion in late Feb early March 2004.

Torsten Mohr <tm***@s.netic.de> wrote in message news:<c4**********@schleim.qwe.de>...
Hi,

i'd like to use 64 Bit Integer values in Python,
can anybody give me a hint on what are the limits
in Python?

Can i use signed and unsigned 64 Bit Integers?
Thanks for hints,
Torsten.

Jul 18 '05 #5

P: n/a
In message <c4*************@news.t-online.com>, Peter Otten wrote:
As for signed integers, the sky's the limit :-)


Surely that's where you calculate pi...

--
Garry Knight
ga*********@gmx.net ICQ 126351135
Linux registered user 182025
Jul 18 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.