Lada Kugis wrote:
[snip]
Normal integers are up to 10 digits, after which they become long
integers, right ?
But if integers can be exactly represented, then why do they need two
types of integers (long and ... uhmm, let's say, normal). I mean,
their error will always be zero, no matter what kin
On Mar 20, 11:02�pm, Lada Kugis wrote:
> On 21 Mar 2009 03:34:18 GMT, Steven D'Aprano
>
> wrote:
>
> Hello Steven,
> thanks for answering on such short notice,
>
>
>
> >Floats in Python don't have infinite precision.
>
> >Ints (or longs) can have infinite precision. Try calculating (say)
> >12345
On 21 Mar 2009 03:34:18 GMT, Steven D'Aprano
wrote:
Hello Steven,
thanks for answering on such short notice,
>
>Floats in Python don't have infinite precision.
>
>Ints (or longs) can have infinite precision. Try calculating (say)
>1234567**315*24689 and you should get 1923 digits. By the way, yo
On Mar 20, 10:12 pm, Lada Kugis wrote:
> I'm a newbie learning python, so forgive for, what may seem to some,
> like a stupid question.
>
> I understand the basic integer and fp type, but what I'm having a
> little trouble are the long type
An "int" is limited to 32 or 64 bits. A "long" can be a
Lada Kugis wrote:
> I'm a newbie learning python, so forgive for, what may seem to some,
> like a stupid question.
>
> I understand the basic integer and fp type, but what I'm having a
> little trouble are the long type and infinite precision type.
>
Longs are essentially unbounded integers. You
On Sat, 21 Mar 2009 04:12:48 +0100, Lada Kugis wrote:
> I'm a newbie learning python, so forgive for, what may seem to some,
> like a stupid question.
>
> I understand the basic integer and fp type, but what I'm having a little
> trouble are the long type and infinite precision type.
>
> Also, w
On Sat, 2009-03-21 at 04:12 +0100, Lada Kugis wrote:
> I'm a newbie learning python, so forgive for, what may seem to some,
> like a stupid question.
>
> I understand the basic integer and fp type, but what I'm having a
> little trouble are the long type and infinite precision type.
>
> Also, whe
I think you are looking for this:
>>> (math.pi - (math.sqrt(math.pi)))**2
1.8745410610157363
>>>
simple, multiplication and division have a higher precedence over addition
and subtraction
-Alex Goretoy
http://www.goretoy.com
--
http://mail.python.org/mailman/listinfo/python-list