Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
py from timeit import Timer
py t1 = Timer((a**b)*(c**d), setup=a,b,c,d = 10, 25, 2, 50)
py min(t1.repeat(repeat=5, number=10))
0.5256571769714355
So that's about 5 microseconds on my (slow) computer.
That's pretty fast. So is
On Tuesday, January 8, 2013 2:06:09 AM UTC-8, Gisle Vanem wrote:
Steven D'Aprano email deleted wrote:
py from timeit import Timer
py t1 = Timer((a**b)*(c**d), setup=a,b,c,d = 10, 25, 2, 50)
py min(t1.repeat(repeat=5, number=10))
0.5256571769714355
So that's about 5 microseconds
Hello,
How to *quickly* calculate large numbers. For example
(10**25) * (2**50)
11258999068426240L
Regards.
--
http://mail.python.org/mailman/listinfo/python-list
On 8 January 2013 00:44, Nac Temha nacctte...@gmail.com wrote:
Hello,
How to quickly calculate large numbers. For example
(10**25) * (2**50)
11258999068426240L
I just tested that line in the interpreter and it ran so quickly it
seemed instantaneous (maybe my computer
On 01/07/13 18:44, Nac Temha wrote:
How to *quickly* calculate large numbers. For example
(10**25) * (2**50)
11258999068426240L
that's how...just do the math. For any other sort of answer, you'd
have to clarify your question. On my laptop, that operation came
back
Thanks for reply. I wonder how quickly calculate big numbers. Can you
explain me as theoretical? Because this numbers overflow size of integer
and double.
On Tue, Jan 8, 2013 at 3:08 AM, Tim Chase python.l...@tim.thechases.comwrote:
On 01/07/13 18:44, Nac Temha wrote:
How to *quickly*
On Tue, 8 Jan 2013, Nac Temha wrote:
Hello,
How to *quickly* calculate large numbers. For example
(10**25) * (2**50)
11258999068426240L
Um, Karatsuba multiplication?
http://en.wikipedia.org/wiki/Karatsuba_algorithm
Or see what GMP folks are doing:
On 01/07/2013 07:44 PM, Nac Temha wrote:
Hello,
How to *quickly* calculate large numbers. For example
(10**25) * (2**50)
11258999068426240L
Since all of the terms are const, you could just use
print 11258999068426240L
Or if you have some
On 01/07/2013 08:22 PM, Nac Temha wrote:
Thanks for reply. I wonder how quickly calculate big numbers. Can you
explain me as theoretical? Because this numbers overflow size of integer
and double.
Please don't top-post. It makes the context totally out of order.
Python automatically promotes
In article mailman.252.1357608154.2939.python-l...@python.org,
Nac Temha nacctte...@gmail.com wrote:
Thanks for reply. I wonder how quickly calculate big numbers. Can you
explain me as theoretical? Because this numbers overflow size of integer
and double.
Now, that's a good question. The
(forwarding the private reply to the group)
On 01/07/2013 09:03 PM, Nac Temha wrote:
Thanks. I using version 2.7 .I want to understand how to handling big
number. Just want to know logic. Without going into further details but I
want to learn logic of this issue. How to keep datas in python?
11 matches
Mail list logo