[issue42779] pow() of huge input does not complete

2020-12-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The computational complexity of algorithm used to convert integer to decimals is proportional to the cube of the size of the number. It is known issue. There are better algorithms (perhaps gmpy2 uses them), but they benefit only extremely large numbers, fo

[issue42779] pow() of huge input does not complete

2020-12-29 Thread minipython
minipython <599192...@qq.com> added the comment: oh.You are right.If i directly compute the huge result without printing,it only takes 115s.Thank you very much.I'm sorry to forget noting the print function. -- ___ Python tracker

[issue42779] pow() of huge input does not complete

2020-12-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Are you sure that this is a time of calculating pow() and not the time of calculating decimal representation of the result? On my computer: >>> t = time(); a = pow(c, 2**14+1); time()-t 11.957276344299316 >>> t = time(); a = pow(c, 2**15+1); time()-t 36.08

[issue42779] pow() of huge input does not complete

2020-12-29 Thread minipython
minipython <599192...@qq.com> added the comment: Here are my information. 1.python 3.8.6 2.windows 10(build 19042 20h2) 3. 16Gb memory 4. It doesn't complete.It takes about 30 minutes but it gives no output. 5. It takes 6.346898794174194s 6. It takes 0.3690004348754883s. -- versions: +P

[issue42779] pow() of huge input does not complete

2020-12-29 Thread Steven D'Aprano
Change by Steven D'Aprano : -- components: +Interpreter Core -C API title: Pow compute can only available in python3.7 -> pow() of huge input does not complete versions: +Python 3.6, Python 3.9 -Python 3.7 ___ Python tracker